diff --git a/mobile/ios/Podfile.lock b/mobile/ios/Podfile.lock index c6c23d942..75168ce1c 100644 --- a/mobile/ios/Podfile.lock +++ b/mobile/ios/Podfile.lock @@ -169,4 +169,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 599d8aeb73728400c15364e734525722250a5382 -COCOAPODS: 1.12.1 +COCOAPODS: 1.11.3 diff --git a/mobile/lib/shared/views/splash_screen.dart b/mobile/lib/shared/views/splash_screen.dart index 2f493d16a..1298e0efe 100644 --- a/mobile/lib/shared/views/splash_screen.dart +++ b/mobile/lib/shared/views/splash_screen.dart @@ -40,12 +40,25 @@ class SplashScreenPage extends HookConsumerWidget { log.severe(e); } - isSuccess = - await ref.read(authenticationProvider.notifier).setSuccessLoginInfo( - accessToken: accessToken, - serverUrl: serverUrl, - offlineLogin: deviceIsOffline, - ); + try { + isSuccess = await ref + .read(authenticationProvider.notifier) + .setSuccessLoginInfo( + accessToken: accessToken, + serverUrl: serverUrl, + offlineLogin: deviceIsOffline, + ); + } catch (error, stackTrace) { + ref.read(authenticationProvider.notifier).logout(); + + log.severe( + 'Cannot set success login info: $error', + error, + stackTrace, + ); + + context.autoPush(const LoginRoute()); + } } // If the device is offline and there is a currentUser stored locallly