Refresh token
GET/v1/auth/exchange-jwt-token
Refresh token
This endpoint allows users to obtain a new JWT access token by providing a valid refresh token. It validates the refresh token, generates a new access token with a 15-minute expiration, retrieves user details from the database, and returns a JSON object containing user session information along with the new access tokens. This endpoint ensures secure authentication by using encrypted cookies and secret keys for token generation and validation.
Responses
- 200
- 403
- 500
User logged in
- application/json
- Schema
- Example (from schema)
Schema
accessToken stringrequired
createdAt date-timerequired
device stringrequired
deviceCreatedAt date-timerequired
email stringrequired
hpkePubKey binarynullable
id uuidrequired
lastLogin date-timenullable
lastTransaction date-timenullable
nickname stringrequired
refreshToken stringrequired
status stringrequired
{
"accessToken": "string",
"createdAt": "2024-09-25T19:42:12.371Z",
"device": "string",
"deviceCreatedAt": "2024-09-25T19:42:12.371Z",
"email": "string",
"hpkePubKey": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"lastLogin": "2024-09-25T19:42:12.371Z",
"lastTransaction": "2024-09-25T19:42:12.371Z",
"nickname": "string",
"refreshToken": "string",
"status": "string"
}
Unauthorized: No refresh token provided
Unexpected error
Loading...