diff options
author | Konstantin Varlamov <var-const@users.noreply.github.com> | 2018-06-07 12:29:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-07 12:29:16 -0400 |
commit | 7b2aa01da3df89dbea23b7c73202c6bf3f5813d3 (patch) | |
tree | f32ffbe3dc72f242bbdfb3c3e87b9003b61b9280 /Firestore/core/src/firebase/firestore/auth/credentials_provider.h | |
parent | 83fc5714b216fc867ac02875a3e2c6b6a013afce (diff) |
Force refresh token if RPC fails with "Unauthenticated" error (#1373)
"Unauthenticated" is presumed to mean that token is expired (which might happen if local clock is wrong) and retried, subject to the usual backoff logic.
Diffstat (limited to 'Firestore/core/src/firebase/firestore/auth/credentials_provider.h')
-rw-r--r-- | Firestore/core/src/firebase/firestore/auth/credentials_provider.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Firestore/core/src/firebase/firestore/auth/credentials_provider.h b/Firestore/core/src/firebase/firestore/auth/credentials_provider.h index 0a1930a..d6ed39a 100644 --- a/Firestore/core/src/firebase/firestore/auth/credentials_provider.h +++ b/Firestore/core/src/firebase/firestore/auth/credentials_provider.h @@ -46,11 +46,14 @@ class CredentialsProvider { virtual ~CredentialsProvider(); + /** Requests token for the current user. */ + virtual void GetToken(TokenListener completion) = 0; + /** - * Requests token for the current user, optionally forcing a refreshed token - * to be fetched. + * Marks the last retrieved token as invalid, making the next `GetToken` + * request force refresh the token. */ - virtual void GetToken(bool force_refresh, TokenListener completion) = 0; + virtual void InvalidateToken() = 0; /** * Sets the listener to be notified of user changes (sign-in / sign-out). It |