Google is committed to advancing racial equity for Black communities. See how.


public interface InternalAuthProvider

Provides an interface for internal clients of Firebase Authentication to get an access token for a signed-in user.

Public Method Summary

abstract void
abstract Task<GetTokenResult>
getAccessToken(boolean forceRefresh)
abstract String
abstract void

Public Methods

public abstract void addIdTokenListener (IdTokenListener listener)

Adds an IdTokenListener to the list of interested listeners. Also indicates that you need a fresh IdToken at all times, turning on Proactive Token Refreshing. Unlike the public method, this method does not trigger immediately when added.

listener represents the IdTokenListener that should be notified when the user state changes.

public abstract Task<GetTokenResult> getAccessToken (boolean forceRefresh)

Fetches a valid STS Token.

forceRefresh force refreshes the token. Should only be set to true if the token is invalidated out of band.

public abstract String getUid ()

Returns a string used to uniquely identify a signed-in user in a Firebase project's user database.

This identifier is opaque and does not correspond necessarily to the user's email address or any other field.

  • the string representation of the uid. Returns null if FirebaseAuth is not added to the Firebase project, or if there is not a currently signed-in user.

public abstract void removeIdTokenListener (IdTokenListener listenerToRemove)

Removes an IdTokenListener from the list of interested listeners.

listenerToRemove represents the instance of IdTokenListener to be removed.