Get Refresh Tokens - /authorize "state" parameter

I’m trying to implement a flow using auth0/nextjs in which I add the access token in the header of API calls. Currently using getAccessToken method for this.

The idea is to call getAccessToken and if it fails (token expired), then:

  1. Get a refresh token
  2. Use the refresh token to obtain a new access token
  3. Use this new access token

When trying to get a refresh token by following the docs, I’m noticing that the we should include a state parameter in the request to /authorize. My question is how/where would I obtain the state parameter when calling the /authorize endpoint on the server-side?

This parameter is optional, but it strongly recommended use it.
Usually SDKs generate it for us
What for?:

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