# Unlimited refresh token from SPA

**URL:** <https://community.auth0.com/t/unlimited-refresh-token-from-spa/76354>\
**Category:** Get Help\
**Created:** [January 13, 2022, 1:57pm UTC](https://community.auth0.com/t/unlimited-refresh-token-from-spa/76354 "2022-01-13T13:57:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjamin.coenen](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/benjamin.coenen/32/34388_2.png) [@benjamin.coenen](https://community.auth0.com/u/benjamin.coenen)\
**Post date:** [January 13, 2022, 1:57pm UTC](https://community.auth0.com/t/unlimited-refresh-token-from-spa/76354/1 "2022-01-13T13:57:42Z")

</div>

Hello, I’m currently trying to generate unlimited refresh token (without any rotation) and fetching it directly thanks the the auth0 react library. I saw it could work only if we enable the refresh token rotation. Then if I enable the refresh token rotation it’s not longer an unlimited refresh token. I know this is not a good practice. But I would like to generate an unlimited token to let my users use this token as an API key into their scripts and then be able to use it without changing it everyday. Do you have a better solution for me ? To answer this use case

---

<div class="post-metadata">

**Author:** ![benjamin.coenen](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/benjamin.coenen/32/34388_2.png) [@benjamin.coenen](https://community.auth0.com/u/benjamin.coenen)\
**Post date:** [January 13, 2022, 1:58pm UTC](https://community.auth0.com/t/unlimited-refresh-token-from-spa/76354/2 "2022-01-13T13:58:53Z")

</div>

BTW I already read this topic [Id token and refresh token from in react app - #3 by stephanie.chamblee](https://community.auth0.com/t/id-token-and-refresh-token-from-in-react-app/63641/3)

---

<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 13, 2022, 2:35pm UTC](https://community.auth0.com/t/unlimited-refresh-token-from-spa/76354/4 "2022-01-13T14:35:06Z")

</div>

Hi @benjamin.coenen,

Welcome to the Auth0 Community!

The Auth0 react library does not have this functionality as it would be insecure.

You should be issuing a set of client credentials as a new third-party application for each developer if you would like to provide your users with developer access to an API. We do not have an API key feature or direct equivalent.

If you search the forum there are topics discussing how to set this up. For example:

> [@How to implement API keys using Auth0?](https://community.auth0.com/t/how-to-implement-api-keys-using-auth0/6296):
>
> We are trying to generate API keys to our services using Auth0 and we are wondering what the best approach is. What we want to give out to our customers is an app\_id and an app\_secret which they can include in their calls to our APIs in order to get access. Our current Auth0 solution for this would be: Create a Non Interactive Client for the customer Authorize this client access to the APIs needed Give out the ClientID/ClientSecret as app\_id and app\_secret to the customer On requests contain…

Hope this helps!

P.S. If you reply to your own topic it knocks it out of our unanswered queue and will often go unanswered.

---

<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 28, 2022, 2:35pm UTC](https://community.auth0.com/t/unlimited-refresh-token-from-spa/76354/5 "2022-01-28T14:35:54Z")

</div>

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