Skip to content

Rotate the OSP

POST
/auth/rotate
curl --request POST \
--url https://localhost:3000/api/v1/auth/rotate \
--header 'Authorization: <Authorization>'

Generates a new OSP and revokes all refresh tokens. The old OSP can no longer log in; access tokens already issued stay valid until they expire (15 minutes max).

New OSP generated

Media typeapplication/json
object
message
required
string
osp
required
string

Example

{
"message": "OSP rotated successfully. Refresh tokens revoked, old OSP no longer valid. Access tokens already issued stay valid until they expire (15 minutes max).",
"osp": "9x8y7z6w5v4u3t2s"
}

Unauthorized

Media typeapplication/json
object
error
required
string
message
string

Example

{
"error": "invalid_request",
"message": "Invalid request body"
}

Erreur interne

Media typeapplication/json
object
error
required
string
message
string

Example

{
"error": "invalid_request",
"message": "Invalid request body"
}