fix(authentication): try/catch on cache retrieve #199

Merged
hugo merged 1 commits from authentication/fix/try-on-cache into master 2023-05-15 19:04:29 +00:00

View File

@ -41,6 +41,7 @@ class AuthenticationFirebaseCacheDataSourceImpl<Data>
return null; return null;
} }
try {
final jwt = await currentUser.getIdToken(true); final jwt = await currentUser.getIdToken(true);
final currentAccount = AccountModel.fromFirebaseUser( final currentAccount = AccountModel.fromFirebaseUser(
currentUser, currentUser,
@ -48,6 +49,9 @@ class AuthenticationFirebaseCacheDataSourceImpl<Data>
); );
return currentAccount; return currentAccount;
} catch (e) {
return null;
}
} }
// Already done by Firebase // Already done by Firebase