Reputation: 35
I have several micro-frontend's running under the same domain, that use auth0 universal login (auth0-spa-js package) and they all work fine, recognizing each others session.
Now, I'm making a new one that requires an in-house login page with email and password, therefore it uses a different package (auth0-js) for it's Embedded login flow.
Both logins work perfectly separately, however they behave differently in these scenarios
A)
B)
login_required
Is there any way I can fix this without having both libraries auth0-spa-js and auth0-js on the new microfrontend?
Some more context:
I had 2 different applications on auth0, one for the universal flow and another one for the embedded one but now I use only one for everything and it still doesn't work.
I also have custom domains enable on auth0.´
Edit:
I've tried the solution I mentioned above - using both libraries auth0-spa-js (for silent authentication and logout) and auth0-js (for login/signup) and now it works fine with both scenarios.
For this to work I have to handle the login redirect with:
However this feels like an overkill and waste of resources, I should be able to have only one library.
Upvotes: 0
Views: 322
Reputation: 35
I've tried the solution I mentioned above - using both libraries auth0-spa-js (for silent authentication and logout) and auth0-js (for login/signup) and now it works fine with both scenarios.
For this to work I have to handle the login redirect with:
However this feels like an overkill and waste of resources, I should be able to have only one library.
Upvotes: 0