# refreshToken missing from request.oidc

**URL:** <https://community.auth0.com/t/refreshtoken-missing-from-request-oidc/75849>\
**Category:** Get Help\
**Tags:** refresh\_token, oidc\
**Created:** [January 5, 2022, 1:53pm UTC](https://community.auth0.com/t/refreshtoken-missing-from-request-oidc/75849 "2022-01-05T13:53:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ashish\_Dwivedi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ashish_dwivedi/32/21432_2.png) [@Ashish\_Dwivedi](https://community.auth0.com/u/Ashish_Dwivedi)\
**Post date:** [January 5, 2022, 1:53pm UTC](https://community.auth0.com/t/refreshtoken-missing-from-request-oidc/75849/1 "2022-01-05T13:53:52Z")

</div>

I’ve created a `Regular Web Application` for an Express-NodeJS application using `express-openid-connect`. The config for auth is like this:

```auto
"authConfig": {
    "authorizationParams": {
      "response_type": "code",
      "audience": " **audience**",
      "scope": "openid profile email offline_access"
    },
    "authRequired": false,
    "auth0Logout": true,
    "baseURL": " **baseURL**",
    "clientID": " **client_id**",
    "clientSecret": " **client_secret** ,
    "issuerBaseURL": " **issuer_base_url**",
    "secret": " **secret**",
    "idpLogout": true
  },

```

For endpoints protected requiresAuth, the `request.oidc` property contains accessToken, but the refreshToken is always undefined.  
The application on Auth0 portal is also configured to use refreshTokens.When the accessToken expires, and refresh function in the accessToken is invoked, an error stating “refresh\_token is missing from the TokenSet” is shown.  
Could you guys please guide me if I’m doing anything wrong here?

---

<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:** [January 6, 2022, 1:39am UTC](https://community.auth0.com/t/refreshtoken-missing-from-request-oidc/75849/3 "2022-01-06T01:39:34Z")

</div>

Hi @Ashish_Dwivedi,

Thanks for reaching out to the Auth0 Community!

After inspecting your _authConfig_, everything appears to be correct.

In this case, could you please check your API settings and see if you are yet to enable the **Allow Offline Access** toggle?

 ![image](https://global.discourse-cdn.com/auth0/original/3X/4/2/425f0335e13e93b0b869d06f011ca8e5123e1117.png)

After doing so, you can obtain the refresh token in the response.

Please let me know how this goes for you.

Thank you.

---

<div class="post-metadata">

**Author:** ![Ashish\_Dwivedi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ashish_dwivedi/32/21432_2.png) [@Ashish\_Dwivedi](https://community.auth0.com/u/Ashish_Dwivedi)\
**Post date:** [January 6, 2022, 3:12am UTC](https://community.auth0.com/t/refreshtoken-missing-from-request-oidc/75849/4 "2022-01-06T03:12:30Z")

</div>

Hi Rueben, thanks for your answer. This indeed was the missing link.  
To put in simpler terms here, I enabled offline access for the API that is specified as the audience in the configuration of the express-openid-connect auth.

---

<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 21, 2022, 3:13am UTC](https://community.auth0.com/t/refreshtoken-missing-from-request-oidc/75849/5 "2022-01-21T03:13:20Z")

</div>

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