The Firebase JS SDK is now in BETA!
This EAP site is no longer maintained. See the official Firebase Documentation site for the latest documentation and information about the Firebase JS SDK.

Home > @firebase/installations > getToken

getToken() function

Returns an Installation auth token, identifying the current Firebase Installation.

Signature:

export declare function getToken(installations: FirebaseInstallations, forceRefresh?: boolean): Promise<string>;

Parameters

Parameter Type Description
installations FirebaseInstallations The Installations instance.
forceRefresh boolean Force refresh regardless of token expiration.

Returns:

Promise<string>