Home > @firebase/auth > signInWithCustomToken
signInWithCustomToken() function
Asynchronously signs in using a custom token.
Signature:
export declare function signInWithCustomToken(auth: Auth, customToken: string): Promise<UserCredential>;
Parameters
Parameter | Type | Description |
---|---|---|
auth | Auth | The Auth instance. |
customToken | string | The custom token to sign in with. |
Returns:
Promise<UserCredential>
Description
Custom tokens are used to integrate Firebase Auth with existing auth systems, and must be generated by an auth backend using the createCustomToken method in the Admin SDK .
Fails with an error if the token is invalid, expired, or not accepted by the Firebase Auth service.