I want to get a refresh token after login, but can't figure it out
-
I'm having trouble getting a refresh token. I've checked out the docs: https://fusionauth.io/docs/v1/tech/oauth/endpoints/#refresh-token-grant-request but can't figure it out.
-
This is a common issue, as there are a couple of prerequisite settings that you need to configure in order to get refresh tokens. When you are trying to get a refresh token and not seeing it, you should double check the following items:
- you are passing a value of
offline_access
whenever ascope
parameter is present. - you have configured the application to generate refresh tokens
- if you are using OAuth, in the UI, it is in the
OAuth
tab; the field isGenerate Refresh Tokens
- if you are using the Login API, it is in the Security tab under
Login API Settings
; the field isGenerate Refresh Tokens
.
- if you are using OAuth, in the UI, it is in the
- you are passing the
client_id
to the refresh grant request. This is required unless you are passing theAuthorization
header (which has theclient_id
in it). - the user is registered to the application for which you are issuing a refresh token.
- you are passing a value of