Skip to content

Commit

Permalink
[Issue-149] Auto logout if login with wrong email
Browse files Browse the repository at this point in the history
  • Loading branch information
saltict committed Nov 20, 2024
1 parent c266a47 commit 790e9fb
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const AuthenticationMythProvider = ({ children }: AuthenticationMythProvi
});

if (rs.error) {
Telegram.WebApp.showAlert(rs.error);
console.error(rs.error);
} else if (rs.success) {
setIsLinked(rs.success);
setLinkData(rs.data);
Expand Down Expand Up @@ -148,7 +148,9 @@ export const AuthenticationMythProvider = ({ children }: AuthenticationMythProvi
setLinkData(rs.data);
// Login with different email
} else {
telegramConnector.showAlert(`Please login again with email "${rs.data?.link_email || ''}"`);
telegramConnector.showAlert(`Wrong email. Link Mythical account with email ${rs.data?.link_email || ''} and try again`, () => {
onLogoutMythAccount();
});
}
} else {
console.log('tokenData', tokenData);
Expand Down

0 comments on commit 790e9fb

Please sign in to comment.