Skip to main content
Verify if the current session is authenticated and retrieve user information.

Request

curl https://api.fucksornot.com/api/auth/check \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Response

Authenticated User

{
  "authenticated": true,
  "userId": "550e8400-e29b-41d4-a716-446655440000",
  "isAdmin": false,
  "mfaEnabled": true,
  "user": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "username": "johndoe",
    "email": "user@example.com"
  }
}

Not Authenticated

{
  "authenticated": false
}

Use Cases

  • Verify token validity on app startup
  • Check if MFA is enabled for the user
  • Determine admin status for UI display