Dynamically change tenant AUTH0_ISSUER_BASE_URL based on query

Hi all :slight_smile:

We are trying to set the AUTH0_ISSUER_BASE_URL at runtime after an api call because we have different url based on the company.

So the situation is

  • we first have a “Login step 0” where we ask the company name
  • now we have the organization id (for auth0 universal login and the information about the AUTH0_ISSUER_BASE_URL

What we wanna know if there is the possibility to set the AUTH0_ISSUER_BASE_URL right now so after the the SDK init

Hi @ivan.limonta,

Welcome to the Auth0 Community!

Unfortunately, there is no possibility to set the AUTH0_ISSUER_BASE_URL dynamically.

But, there is a workaround that is not 100% guaranteed; you should be able to get the hosted app’s domain and change it at runtime just before you initialize a new Auth0 instance. This way, you can add a condition to set the AUTH0_ISSUER_BASE_URL based on the hosted app’s domain.

I hope this response was helpful.

Thanks,
Timotei