UNPKG

voluptasmollitia

Version:
32 lines (18 loc) 1.16 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@firebase/auth](./auth.md) &gt; [signInWithCustomToken](./auth.signinwithcustomtoken.md) ## signInWithCustomToken() function Asynchronously signs in using a custom token. <b>Signature:</b> ```typescript export declare function signInWithCustomToken(auth: Auth, customToken: string): Promise<UserCredential>; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | auth | [Auth](./auth.auth.md) | The Auth instance. | | customToken | string | The custom token to sign in with. | <b>Returns:</b> Promise&lt;[UserCredential](./auth.usercredential.md)<!-- -->&gt; ## Remarks Custom tokens are used to integrate Firebase Auth with existing auth systems, and must be generated by an auth backend using the [createCustomToken](https://firebase.google.com/docs/reference/admin/node/admin.auth.Auth#createcustomtoken) method in the [Admin SDK](https://firebase.google.com/docs/auth/admin) . Fails with an error if the token is invalid, expired, or not accepted by the Firebase Auth service.