InternalAuthProvider

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
getUid()
abstract void

Public Methods

public abstract voidaddIdTokenListener(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.

Parameters
listenerrepresents the IdTokenListener that should be notified when the user state changes.

public abstract Task<GetTokenResult>getAccessToken(boolean forceRefresh)

Fetches a valid STS Token.

Parameters
forceRefreshforce refreshes the token. Should only be set to true if the token is invalidated out of band.
Returns

public abstract StringgetUid()

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.

Returns
  • 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 voidremoveIdTokenListener(IdTokenListener listenerToRemove)

Removes an IdTokenListener from the list of interested listeners.

Parameters
listenerToRemoverepresents the instance of IdTokenListener to be removed.