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
Showing only changes of commit ef19191093 - Show all commits

View File

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