fix(authentication): try/catch on cache retrieve
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
Hugo Pointcheval 2023-05-15 16:50:16 +02:00
parent 873a3b426d
commit ef19191093
Signed by: hugo
GPG Key ID: 3AAC487E131E00BC

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