* [pve-devel] [PATCH proxmox-login-manager 1/2] saved login: don't give outdated ticket to login form
@ 2023-07-04 13:53 Dominik Csapak
2023-07-04 13:53 ` [pve-devel] [PATCH proxmox-login-manager 2/2] tfa: allow closing tfa form Dominik Csapak
2023-07-04 15:22 ` [pve-devel] applied-series: [PATCH proxmox-login-manager 1/2] saved login: don't give outdated ticket to login form Thomas Lamprecht
0 siblings, 2 replies; 3+ messages in thread
From: Dominik Csapak @ 2023-07-04 13:53 UTC (permalink / raw)
To: pve-devel
if the user was logged in in the past, but that ticket expired, we still
gave the expired ticket to the login form which tried to login with
that, producing a login error the first time the user pressed login.
we already get the correct ticket in a variable, so use that.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
lib/proxmox_login_selector.dart | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/proxmox_login_selector.dart b/lib/proxmox_login_selector.dart
index e599461..8573ab0 100644
--- a/lib/proxmox_login_selector.dart
+++ b/lib/proxmox_login_selector.dart
@@ -207,7 +207,7 @@ class _ProxmoxLoginSelectorState extends State<ProxmoxLoginSelector> {
builder: (context) => ProxmoxLoginPage(
userModel: user,
isCreate: isCreate,
- ticket: user?.ticket,
+ ticket: ticket,
password: password,
)));
refreshFromStorage();
--
2.30.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pve-devel] [PATCH proxmox-login-manager 2/2] tfa: allow closing tfa form
2023-07-04 13:53 [pve-devel] [PATCH proxmox-login-manager 1/2] saved login: don't give outdated ticket to login form Dominik Csapak
@ 2023-07-04 13:53 ` Dominik Csapak
2023-07-04 15:22 ` [pve-devel] applied-series: [PATCH proxmox-login-manager 1/2] saved login: don't give outdated ticket to login form Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Dominik Csapak @ 2023-07-04 13:53 UTC (permalink / raw)
To: pve-devel
abort the login when the form returns null. This happens if the user
presses 'X' in the tfa form.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
lib/proxmox_login_form.dart | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/lib/proxmox_login_form.dart b/lib/proxmox_login_form.dart
index dbc912a..861947d 100644
--- a/lib/proxmox_login_form.dart
+++ b/lib/proxmox_login_form.dart
@@ -433,11 +433,21 @@ class _ProxmoxLoginPageState extends State<ProxmoxLoginPage> {
if (client.credentials.tfa != null &&
client.credentials.tfa!.kinds().length > 0) {
- client = await Navigator.of(context).push(MaterialPageRoute(
+ ProxmoxApiClient? tfaclient =
+ await Navigator.of(context).push(MaterialPageRoute(
builder: (context) => ProxmoxTfaForm(
apiClient: client,
),
));
+
+ if (tfaclient != null) {
+ client = tfaclient;
+ } else {
+ setState(() {
+ _progressModel.inProgress -= 1;
+ });
+ return;
+ }
}
final status = await client.getClusterStatus();
--
2.30.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* [pve-devel] applied-series: [PATCH proxmox-login-manager 1/2] saved login: don't give outdated ticket to login form
2023-07-04 13:53 [pve-devel] [PATCH proxmox-login-manager 1/2] saved login: don't give outdated ticket to login form Dominik Csapak
2023-07-04 13:53 ` [pve-devel] [PATCH proxmox-login-manager 2/2] tfa: allow closing tfa form Dominik Csapak
@ 2023-07-04 15:22 ` Thomas Lamprecht
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2023-07-04 15:22 UTC (permalink / raw)
To: Proxmox VE development discussion, Dominik Csapak
Am 04/07/2023 um 15:53 schrieb Dominik Csapak:
> if the user was logged in in the past, but that ticket expired, we still
> gave the expired ticket to the login form which tried to login with
> that, producing a login error the first time the user pressed login.
>
> we already get the correct ticket in a variable, so use that.
>
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
> lib/proxmox_login_selector.dart | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
applied both patches, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-04 15:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-04 13:53 [pve-devel] [PATCH proxmox-login-manager 1/2] saved login: don't give outdated ticket to login form Dominik Csapak
2023-07-04 13:53 ` [pve-devel] [PATCH proxmox-login-manager 2/2] tfa: allow closing tfa form Dominik Csapak
2023-07-04 15:22 ` [pve-devel] applied-series: [PATCH proxmox-login-manager 1/2] saved login: don't give outdated ticket to login form Thomas Lamprecht
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox