🐛 Fix login didn't request factor code correctly
This commit is contained in:
parent
af044a86bc
commit
2c6b1feca6
@ -271,13 +271,14 @@ class _LoginPickerScreenState extends State<_LoginPickerScreen> {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Request one-time-password code
|
// Request one-time-password code
|
||||||
sn.client.post('/cgi/id/auth/factors/$_factorPicked');
|
await sn.client.post('/cgi/id/auth/factors/$_factorPicked');
|
||||||
widget.onPickFactor(
|
widget.onPickFactor(
|
||||||
widget.factors!.where((x) => x.id == _factorPicked).first,
|
widget.factors!.where((x) => x.id == _factorPicked).first,
|
||||||
);
|
);
|
||||||
widget.onNext();
|
widget.onNext();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
context.showErrorDialog(err);
|
// ignore: use_build_context_synchronously
|
||||||
|
if (context.mounted) context.showErrorDialog(err);
|
||||||
return;
|
return;
|
||||||
} finally {
|
} finally {
|
||||||
setState(() => _isBusy = false);
|
setState(() => _isBusy = false);
|
||||||
|
Loading…
Reference in New Issue
Block a user