Skip to main content

Refresh an expired JWT

POST 

/auth/refresh

Exchanges a valid refresh token for a new JWT (and a new refresh token). The original refresh token is single-use: when several requests send the same token at once, only one of them gets a new JWT, the others answer "Invalid refresh token."

Requirements

  • The refresh-token feature must be enabled in the plugin settings.
  • The refresh token must exist in the database and not have exceeded the maximum token age configured in the plugin settings.
  • Authentication must be enabled in the plugin settings.
  • If "Refresh Token Requires Auth Code" is enabled, AUTH_KEY must be provided.
  • If a JWT is also sent (header, cookie, session or JWT parameter) and it has been revoked, the request is rejected. Any other problem with that JWT (for example, expired) is ignored.

Custom payload claims Optionally supply payload as a JSON-encoded object to add extra claims to the newly issued JWT. Reserved identity claims are always derived from the authenticated user and cannot be overridden this way.

Request​

Responses​

JWT refreshed successfully. Returns a new JWT and a new refresh token.