Logout
Authentication
Logout
Invalidate the current refresh token and clear the authentication cookie
POST
Logout
Endpoint
http://localhost:3000/api/v1
This endpoint does not use Bearer authentication. It requires the
refreshToken cookie issued at
login or email verification.Authentication
Include the refresh token cookie with the request:Description
This endpoint:- verifies the refresh token from the cookie
- invalidates it in storage
- clears the
refreshTokencookie from the response
Response
Success Response (200 OK)
Error Responses
401 Unauthorized - Refresh Token Not Found
401 Unauthorized - Invalid Refresh Token
Notes
Cookie-Based Logout: This endpoint is tied to the refresh token cookie, not the access token
in the Authorization header.
Related Endpoints
- Login - Create a new authenticated session
- Refresh Token - Rotate the access token using the cookie
