This commit is contained in:
BLoC
2025-02-12 17:22:33 +03:00
parent 8282d49064
commit bd519da491

View File

@@ -86,10 +86,14 @@ class _AuthScreenState extends State<AuthScreen> {
await _controller.runJavaScript(jsChannelAuthScript);
} else if (url.contains('profile')) {
if (credentialsInStorage) {
await CredentialsStorage.saveCredentials(email, password);
await loginInApplication();
} else {
await logoutFromWeb();
if (email.isNotEmpty && password.isNotEmpty) {
await CredentialsStorage.saveCredentials(email, password);
await loginInApplication();
} else {
await logoutFromWeb();
}
}
} else {
if (tokenInStorage && credentialsInStorage) {