Skip to content

Commit

Permalink
Robustify getIdToken (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbonnin authored Apr 27, 2024
1 parent cb6452f commit 1c5fa0b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ class FirebaseUserRepository : UserRepository {
}

override suspend fun getIdToken(): String? {
return currentUser.value?.getIdToken(false)
return try {
currentUser.value?.getIdToken(false)
} catch (e: Exception) {
// See https://github.com/firebase/firebase-android-sdk/issues/5328#issuecomment-1719386926
null
}
}

override suspend fun setUser(user: Any?) {
Expand Down

0 comments on commit 1c5fa0b

Please sign in to comment.