Mixing Auth0 Libraries

I tired to mix the auth0-react and the auth0-spa-js library in a react application.

the reason is that on the one side I like the smooth syntax to export authenticated views with “withAuthenticationRequired” but on the other side I have to get access tokens outside of hooks.

It works fine on desktops but on ipad and iphone i got issues as soon as the cross site protections are activated ( which is on by default).

The error is LOGIN_REQUIRED.
My Assumption was that all libaries will use same states( cookies) and therefore would be ineropable.

So is this a supported scenario or should it be avoided?

Hi @Tzypo,

This isn’t something I have seen recommended. I would suggest sticking to one library, otherwise you are in a bit of uncharted territory.

I can tell you the login_required error throws when a silent auth request fails, due to the cookie being invalid or non-existent.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.