I'm trying to set things up so we can support two ...
# support-questions-legacy
d
I'm trying to set things up so we can support two kinds of customers: - They need to log in with Okta. Which requires we pre-setup the account for them.. aka no self-serve sign ups - They don't need Okta, and want to self-serve sign up for an account. Just using Google is what we need here. It's not clear to me the best way to support the above in Supertokens. Should i have two separate frontend supertoken config files? and loads the appropriate one based on if there is a TenantID in localstorage or not?
r
hey @drew03147
to achieve this, you can: - Ask the user for their org ID first during self sign up flow. Once they give that, send that to an API which whill create a tenant with that ID and enabled google sign in for that tenant. - Save the org id provided by them in localstorage (therefore it will be returned from getTenantId in multitenancy.init) - When the sign in form is rendered, they will now see google sign in. Later on, you can add okta to their tenant ID.
d
@rp_st thanks for the reply. This quick video should explain a little better on what i'm trying to do: https://www.loom.com/share/e65fcf0a46fe4a529a4bde8ab506d487
r
for google to show up in the default tenant, you should add google as a provider to the
public
tenant (in the same way you add google and okta for a specific tenant)
the
public
tenant is the default tenant.
which is the same as when there is no tenant ID loaded up (returning undefined from the getTenantId func)
does this make sense?
@drew03147 ^^
d
ok gotcha. will try that. thanks!
works, thanks!
r
Great.