From bd519da49178065d4c2b615828ab31bcc60f5035 Mon Sep 17 00:00:00 2001 From: BLoC Date: Wed, 12 Feb 2025 17:22:33 +0300 Subject: [PATCH] fix: reg --- lib/features/auth/auth_screen/auth_screen.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/features/auth/auth_screen/auth_screen.dart b/lib/features/auth/auth_screen/auth_screen.dart index 998cfc76..9d1a45ab 100644 --- a/lib/features/auth/auth_screen/auth_screen.dart +++ b/lib/features/auth/auth_screen/auth_screen.dart @@ -86,10 +86,14 @@ class _AuthScreenState extends State { 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) {