Dynamic white label login page by domain with dynamic signIn options

Hey folks. My current task is to create a dynamic login page for different clients and different users through our internal subscription system. And white label it by client

The requirements are:

  • White label based on the domain
  • Different login options based on the company or user subscription. Meaning as user Foo in company A you might log in with a password/email and google SSO. And as user Bar in company B might have only a password/email login.

Current implementation

  • On FE app we are using a library @auth0/auth0-react with loginWithRedirect
  • On BE, which is dedicated to communication with FE via websocket. We use library auth0, to validate the user with accessToken for establishing the connection. Meaning the domain and clientId must be matching for both of them

My question is: What is the simplest way how to create a white labeled loginWithRedirect with dynamic login options (e.g.: with or without SSO) for company/user. Without creating a new tenant and new db connection for each case? Also, it is quite tricky to connect the FE and BE credentials (domain and clientId) dynamically based on the client’s request.

1 Like