Go to console

Index

Properties

app

app: App

Methods

createCustomToken

  • createCustomToken(uid: string, developerClaims?: Object): Promise<string>
  • Creates a new Firebase custom token (JWT) that can be sent back to a client device to use to sign in with the client SDKs' signInWithCustomToken() methods.

    See Create Custom Tokens for code samples and detailed documentation.

    Parameters

    • uid: string

      The uid to use as the custom token's subject.

    • Optional developerClaims: Object

      Optional additional claims to include in the custom token's payload.

    Returns Promise<string>

    A promise fulfilled with a custom token for the provided uid and payload.

createProviderConfig

  • Returns a promise that resolves with the newly created AuthProviderConfig when the new provider configuration is created.

    SAML and OIDC provider support requires Google Cloud's Identity Platform (GCIP). To learn more about GCIP, including pricing and features, see the GCIP documentation.

    Parameters

    Returns Promise<AuthProviderConfig>

    A promise that resolves with the created provider configuration.

createSessionCookie

  • Creates a new Firebase session cookie with the specified options. The created JWT string can be set as a server-side session cookie with a custom cookie policy, and be used for session management. The session cookie JWT will have the same payload claims as the provided ID token.

    See Manage Session Cookies for code samples and detailed documentation.

    Parameters

    • idToken: string

      The Firebase ID token to exchange for a session cookie.

    • sessionCookieOptions: SessionCookieOptions

      The session cookie options which includes custom session duration.

    Returns Promise<string>

    A promise that resolves on success with the created session cookie.

createUser

  • Creates a new user.

    See Create a user for code samples and detailed documentation.

    Parameters

    • properties: CreateRequest

      The properties to set on the new user record to be created.

    Returns Promise<UserRecord>

    A promise fulfilled with the user data corresponding to the newly created user.

deleteProviderConfig

  • deleteProviderConfig(providerId: string): Promise<void>
  • Deletes the provider configuration corresponding to the provider ID passed. If the specified ID does not exist, an auth/configuration-not-found error is thrown.

    SAML and OIDC provider support requires Google Cloud's Identity Platform (GCIP). To learn more about GCIP, including pricing and features, see the GCIP documentation.

    Parameters

    • providerId: string

      The provider ID corresponding to the provider config to delete.

    Returns Promise<void>

    A promise that resolves on completion.

deleteUser

  • deleteUser(uid: string): Promise<void>
  • Deletes an existing user.

    See Delete a user for code samples and detailed documentation.

    Parameters

    • uid: string

      The uid corresponding to the user to delete.

    Returns Promise<void>

    An empty promise fulfilled once the user has been deleted.