# Mixing Auth0 Libraries

**URL:** <https://community.auth0.com/t/mixing-auth0-libraries/55856>\
**Category:** Get Help\
**Tags:** auth0-react, react\
**Created:** [January 8, 2021, 12:25am UTC](https://community.auth0.com/t/mixing-auth0-libraries/55856 "2021-01-08T00:25:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tzypo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/tzypo/32/26150_2.png) [@Tzypo](https://community.auth0.com/u/Tzypo)\
**Post date:** [January 8, 2021, 12:25am UTC](https://community.auth0.com/t/mixing-auth0-libraries/55856/1 "2021-01-08T00:25:41Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [January 8, 2021, 7:33pm UTC](https://community.auth0.com/t/mixing-auth0-libraries/55856/3 "2021-01-08T19:33:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 23, 2021, 7:33pm UTC](https://community.auth0.com/t/mixing-auth0-libraries/55856/4 "2021-01-23T19:33:58Z")

</div>

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