Interface TokenProvider

All Known Implementing Classes:
FirebaseAuthTokenProvider

public interface TokenProvider

Supplies the Firebase ID token that authenticates Firestore requests.

FirebaseAuthTokenProvider adapts FirebaseAuth. A custom implementation can obtain tokens any other way.

  • Method Details

    • getIdToken

      String getIdToken()
      Returns

      the current ID token, or null to send the request without one

    • refreshIdToken

      AsyncResource<String> refreshIdToken()

      Obtains a fresh token after the server rejected the current one.

      Returns

      a resource that completes with the new token