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 companyA
you might log in with apassword/email
andgoogle SSO
. And as userBar
in companyB
might have only apassword/email
login.
Current implementation
- On FE app we are using a library
@auth0/auth0-react
withloginWithRedirect
- On BE, which is dedicated to communication with FE via websocket. We use library
auth0
, to validate the user withaccessToken
for establishing the connection. Meaning thedomain
andclientId
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.