Konsola git

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