skip to Main Content

I found in documentation that is only possible using the console. That is true? I think that should exists a way that I can do that via api, no?

Ref: https://cloud.google.com/identity-platform/docs/multi-tenancy-managing-tenants

3

Answers


  1. How can I create a tenant with social provider with firebase admin SDK?. I found in documentation that is only possible using the console

    The doc you refer to explains that:

    Using the Admin SDK, you can
    manage tenants programmatically from a secure server environment
    instead of using the console. This includes the ability to create,
    list, get, modify, or delete tenants

    and you can find the following example for creating a tenant. Note that by "secure server environment" the doc means a server you own on which you execute Admin SDK code or a Cloud Function.

    admin.auth().tenantManager().createTenant({
      displayName: 'myTenant1',
      emailSignInConfig: {
        enabled: true,
        passwordRequired: false, // Email link sign-in enabled.
      },
      // TODO: Remove if you don't want to enable multi-factor authentication.
      multiFactorConfig: {
        state: 'ENABLED',
        factorIds: ['phone']
      },
      // TODO: Remove if you don't want to register test phone numbers for use
      // with multi-factor authentication.
      testPhoneNumbers: {
        '+16505551234': '145678',
        '+16505550000': '123456'
      },
    })
    .then((createdTenant) => {
      console.log(createdTenant.toJSON());
    })
    .catch((error) => {
      // Handle error.
    });
    
    Login or Signup to reply.
  2. I know this is a bit late but it looks like adding social logins to a tenant via the admin sdk is not supported at the moment. See this doc

    My best reporoduction of the table in markdown

    Feature Google Cloud Console Admin SDK
    Email X X
    OIDC X X
    SAML X X
    Social X
    Phone
    MFA X X
    Anonymous X
    Login or Signup to reply.
  3. Your client side code is what enables the various social provider sign-in’s. In other words, the admin SDK has nothing to do with it.

    To setup the various social providers, see Firebase Authentication.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search