Skip to content

Commit

Permalink
Fix inconsitent state (#446)
Browse files Browse the repository at this point in the history
If user clicks on New user login flow, abandon that in between and tries
account recovery via recovery code, we were using old volatile password
in memory for generating the recovery_key for UI.

This PR fixes that issue.
  • Loading branch information
ua741 authored Feb 9, 2024
1 parent 27c6d8f commit f6f8b1c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
39 changes: 21 additions & 18 deletions lib/ui/account/login_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class _LoginPageState extends State<LoginPage> {
buttonText: context.l10n.logInLabel,
onPressedFunction: () async {
UserService.instance.setEmail(_email!);
Configuration.instance.resetVolatilePassword();
SrpAttributes? attr;
bool isEmailVerificationEnabled = true;
try {
Expand Down Expand Up @@ -176,31 +177,33 @@ class _LoginPageState extends State<LoginPage> {
.copyWith(fontSize: 12),
tags: {
'u-terms': StyledTextActionTag(
(String? text, Map<String?, String?> attrs) => Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) {
return WebPage(
context.l10n.termsOfServicesTitle,
"https://ente.io/terms",
);
},
),
(String? text, Map<String?, String?> attrs) =>
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) {
return WebPage(
context.l10n.termsOfServicesTitle,
"https://ente.io/terms",
);
},
),
),
style: const TextStyle(
decoration: TextDecoration.underline,
),
),
'u-policy': StyledTextActionTag(
(String? text, Map<String?, String?> attrs) => Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) {
return WebPage(
context.l10n.privacyPolicyTitle,
"https://ente.io/privacy",
);
},
),
(String? text, Map<String?, String?> attrs) =>
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) {
return WebPage(
context.l10n.privacyPolicyTitle,
"https://ente.io/privacy",
);
},
),
),
style: const TextStyle(
decoration: TextDecoration.underline,
),
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ente_auth
description: ente two-factor authenticator
version: 2.0.33+233
version: 2.0.34+234
publish_to: none

environment:
Expand Down

0 comments on commit f6f8b1c

Please sign in to comment.