# Auth0-spa-js VS auth0-react

**URL:** <https://community.auth0.com/t/auth0-spa-js-vs-auth0-react/71360>\
**Category:** Get Help\
**Created:** [October 14, 2021, 10:23pm UTC](https://community.auth0.com/t/auth0-spa-js-vs-auth0-react/71360 "2021-10-14T22:23:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![warrick.fitzgerald](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/warrick.fitzgerald/32/32349_2.png) [@warrick.fitzgerald](https://community.auth0.com/u/warrick.fitzgerald)\
**Post date:** [October 14, 2021, 10:23pm UTC](https://community.auth0.com/t/auth0-spa-js-vs-auth0-react/71360/1 "2021-10-14T22:23:37Z")

</div>

I have found my way to two different React libraries

**[GitHub - auth0/auth0-spa-js: Auth0 authentication for Single Page Applications (SPA) with PKCE](https://github.com/auth0/auth0-spa-js)**  
and  
**[GitHub - auth0/auth0-react: Auth0 SDK for React Single Page Applications (SPA)](https://github.com/auth0/auth0-react)**

What’s the difference between these two?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [October 15, 2021, 4:05pm UTC](https://community.auth0.com/t/auth0-spa-js-vs-auth0-react/71360/3 "2021-10-15T16:05:04Z")

</div>

Hi @warrick.fitzgerald,

Welcome to the Auth0 Community!

The main difference between the two SDK’s that you shared with me is the type of framework you use for your SPA.

As seen in our [Quickstart documentation](https://auth0.com/docs/quickstart/spa), we offer support for **React** , **Angular** , and **Vue** and **Javascript SDK’s** for Single-Page Applications.

Under the hood, the Auth0 React SDK implements [Universal Login](https://auth0.com/docs/login/universal-login) and the [Authorization Code Grant Flow with PKCE](https://auth0.com/docs/authorization/flows/authorization-code-flow-with-proof-key-for-code-exchange-pkce). In essence, the two SDK’s you shared with me are functionally the same.

This is because Single-Page Applications are public clients and cannot store any secrets. Hence why SPA’s implement PKCE for token exchange. See [here](https://auth0.com/docs/authorization/flows/authorization-code-flow-with-proof-key-for-code-exchange-pkce) for a more detailed explanation.

In this case, if you plan on developing your application with React, then the appropriate SDK to use is the [Auth0 React](https://github.com/auth0/auth0-react) SDK. Similarly, for the other frameworks.

Otherwise, the appropriate SDK to use with your Javascript app is the [Auth0 spa-js](https://github.com/auth0/auth0-spa-js) SDK.

Hoped this helps! Please let me know if you have any questions.

Thank you.

---

<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:** [October 30, 2021, 4:05pm UTC](https://community.auth0.com/t/auth0-spa-js-vs-auth0-react/71360/4 "2021-10-30T16:05:25Z")

</div>

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