# Token endpoint not returning refresh token

**URL:** <https://community.auth0.com/t/token-endpoint-not-returning-refresh-token/81743>\
**Category:** Get Help\
**Tags:** jwt, login, auth0\
**Created:** [April 14, 2022, 9:02am UTC](https://community.auth0.com/t/token-endpoint-not-returning-refresh-token/81743 "2022-04-14T09:02:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![youssef](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/youssef/32/33301_2.png) [@youssef](https://community.auth0.com/u/youssef)\
**Post date:** [April 14, 2022, 9:02am UTC](https://community.auth0.com/t/token-endpoint-not-returning-refresh-token/81743/1 "2022-04-14T09:02:21Z")

</div>

Hello everyone,

I want to allow our application’s users to stay logged in for at least one month. I digged a little bit in the community, and I found this topic [How to stay logged in forever(ish)](https://community.auth0.com/t/how-to-stay-logged-in-forever-ish/62926). So I enabled refresh token for our application, and added to Auth0Provider configuration this param : useRefreshTokens: true. But when a user log in, the token endpoint returns only : access\_token and id\_token but not refresh token.

Can someone give me a hint plz ?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [April 15, 2022, 5:37am UTC](https://community.auth0.com/t/token-endpoint-not-returning-refresh-token/81743/3 "2022-04-15T05:37:44Z")

</div>

Hey there @youssef!

> [@youssef](#):
>
> But when a user log in, the token endpoint returns only : access\_token and id\_token but not refresh token.

Despite the fact that `useRefreshTokens` is set to `true`, the fact that there is no refresh token returned when a user logs in leads me to believe that the `offline_access` scope is missing in the /authorize request. The `offline_access` scope is required in order for a refresh token to be returned. See:  
[https://auth0.com/docs/secure/tokens/refresh-tokens/get-refresh-tokens](https://auth0.com/docs/secure/tokens/refresh-tokens/get-refresh-tokens)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [April 30, 2022, 5:38am UTC](https://community.auth0.com/t/token-endpoint-not-returning-refresh-token/81743/4 "2022-04-30T05:38:39Z")

</div>

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