Refresh Access Token
POST/api/auth/refresh
Request a new AccessToken.
Tokens
- Requires a valid
RefreshToken. - If successful,
AccessTokenandRefreshTokenwill automatically be set as HTTP-only cookies. If header authentication is enabled,AccessTokenandRefreshTokenwill be returned in the response body and can be used as bearer tokens in the authorization header for upcoming requests.
Request
Responses
- 200
- 401
- 404
- 500
Authentication successful. Returns tokens and user details.
The following error codes correspond to this status:
REFRESH_TOKEN_EXPIRED: Indicates that the refresh token is expired.REFRESH_TOKEN_INVALID: Indicates that the refresh token cannot be decoded.REFRESH_TOKEN_MISSING: Thrown when the refresh token is missing.
The following error codes correspond to this status:
USER_NOT_FOUND: User not found.
The following error codes correspond to this status:
DATABASE_FAILURE: Exception representing a general failure related to database operations.DATABASE_ENCRYPTION_FAILURE: Exception representing a general failure related to database encryption operations.ACCESS_TOKEN_CACHE_FAILURE: Thrown when an access token could not be created due to an exception in the access token whitelist.ACCESS_TOKEN_ENCODING_FAILURE: Represents an exception that occurs during the encoding process of an access token.ACCESS_TOKEN_CREATION_FAILURE: Thrown when a generic exception occurred during the creation of an access token.ACCESS_TOKEN_INVALID_PRINCIPAL_DOCUMENT_FAILURE: Indicates that the principal document associated with the access token is invalid.ACCESS_TOKEN_SECRET_FAILURE: Represents an exception that occurs when there is a failure related to the secret required for creating an access token.REFRESH_TOKEN_ENCODING_FAILURE: Represents an exception that occurs during the encoding process of a refresh token.REFRESH_TOKEN_CREATION_FAILURE: Thrown when a generic exception occurred during the creation of an access token.REFRESH_TOKEN_INVALID_PRINCIPAL_DOCUMENT_FAILURE: Indicates that the principal document associated with the access token is invalid.REFRESH_TOKEN_SECRET_FAILURE: Represents an exception that occurs when there is a failure related to the secret required for creating a refresh token.REFRESH_TOKEN_SESSION_UPDATE_FAILURE: Thrown when an exception occurs when updating the user sessions after creating a new refresh token.INVALID_PRINCIPAL_DOCUMENT: A requested principal document was stored in an invalid format.COOKIE_CREATION_FAILURE: Thrown when an exception occurred during the creation of a cookie.