# Auth0-node Refresh Grant Missing Payload

**URL:** <https://community.auth0.com/t/auth0-node-refresh-grant-missing-payload/125305>\
**Category:** Get Help\
**Tags:** apis, application\
**Created:** [January 21, 2024, 10:36pm UTC](https://community.auth0.com/t/auth0-node-refresh-grant-missing-payload/125305 "2024-01-21T22:36:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dave-mogi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dave-mogi/32/54114_2.png) [@dave-mogi](https://community.auth0.com/u/dave-mogi)\
**Post date:** [January 21, 2024, 10:36pm UTC](https://community.auth0.com/t/auth0-node-refresh-grant-missing-payload/125305/1 "2024-01-21T22:36:04Z")

</div>

I’m using the latest version of `auth0-node` (4.2.0) to do a refresh grant exactly as shown in the [example](https://github.com/auth0/node-auth0/blob/master/EXAMPLES.md#use-refresh-tokens):

```auto
import { AuthenticationClient } from 'auth0';

const auth = new AuthenticationClient({
  domain: '{YOUR_TENANT_AND REGION}.auth0.com',
  clientId: '{YOUR_CLIENT_ID}',
  clientSecret: '{YOUR_CLIENT_SECRET}',
});

// Get a new access token
const {
  data: { access_token },
} = await auth.oauth.refreshTokenGrant({
  refresh_token: refreshToken,
});

```

I’ve populated `domain` with the tenant and region subdomain as shown in the example. The access token returned is missing the payload:

```auto
"access_token": "[...]29tLyJ9..JdBYlv[...]", // <- token is missing payload: ".."

```

---

<div class="post-metadata">

**Author:** ![dave-mogi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dave-mogi/32/54114_2.png) [@dave-mogi](https://community.auth0.com/u/dave-mogi)\
**Post date:** [January 26, 2024, 4:54pm UTC](https://community.auth0.com/t/auth0-node-refresh-grant-missing-payload/125305/3 "2024-01-26T16:54:05Z")

</div>

I raised an issue in the `auth0-node` repo: [Refresh Token Grant Access Token is Missing Payload · Issue #983 · auth0/node-auth0 · GitHub](https://github.com/auth0/node-auth0/issues/983)

---

<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:** [January 26, 2024, 9:11pm UTC](https://community.auth0.com/t/auth0-node-refresh-grant-missing-payload/125305/4 "2024-01-26T21:11:11Z")

</div>

Hey there @dave-mogi welcome to the community!

Thanks for opening up a GH issue as well - Given this is a refresh token grant/exchange, I’m curious to know if the access obtained before the refresh has the expected payload?

---

<div class="post-metadata">

**Author:** ![dave-mogi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dave-mogi/32/54114_2.png) [@dave-mogi](https://community.auth0.com/u/dave-mogi)\
**Post date:** [January 27, 2024, 2:45pm UTC](https://community.auth0.com/t/auth0-node-refresh-grant-missing-payload/125305/5 "2024-01-27T14:45:59Z")

</div>

No, it didn’t! I had gotten the refresh token from a password grant without originally passing an audience, resulting in a a set of tokens where the access token did not have a payload. It was the refresh token from this set that I was using that was not returning access tokens with payloads in subsequent refresh token grants.

I’ll open a PR for the SDK documentation, to clarify how this is supposed to work.

---

<div class="post-metadata">

**Author:** ![dave-mogi](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dave-mogi/32/54114_2.png) [@dave-mogi](https://community.auth0.com/u/dave-mogi)\
**Post date:** [January 27, 2024, 3:26pm UTC](https://community.auth0.com/t/auth0-node-refresh-grant-missing-payload/125305/6 "2024-01-27T15:26:28Z")

</div>

Here’s a PR to update the SDK documentation: [Clarify obtaining a refresh token that can be used to obtain JWT acce… by davidwarshaw · Pull Request #984 · auth0/node-auth0 · GitHub](https://github.com/auth0/node-auth0/pull/984)

---

<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:** [February 10, 2024, 3:26pm UTC](https://community.auth0.com/t/auth0-node-refresh-grant-missing-payload/125305/7 "2024-02-10T15:26:58Z")

</div>

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