Skip to main content
GET

Overview

The /reauthenticate endpoint verifies the user’s identity for sensitive operations that require additional security confirmation. This endpoint is typically used before allowing users to perform critical actions like changing passwords, updating payment methods, or accessing sensitive data.
This endpoint requires a valid JWT token in the Authorization header.

Request

Response

Response Fields

Implementation Examples

React Hook for Reauthentication

Protected Route Component

Node.js Middleware

Use Cases

Sensitive Operations

Require reauthentication before:
  • Changing passwords or email addresses
  • Updating payment methods
  • Deleting accounts or data
  • Accessing financial information
  • Modifying security settings

Time-Based Security

  • Short-lived verification: 5-15 minutes for critical operations
  • Session-based: Require reauthentication once per session for sensitive areas
  • Operation-specific: Different timeouts for different sensitivity levels

Progressive Security

  • Low sensitivity: No reauthentication required
  • Medium sensitivity: Reauthentication within last 15 minutes
  • High sensitivity: Reauthentication within last 5 minutes
  • Critical operations: Fresh reauthentication required

Security Considerations

  • Token Age: Check both JWT iat (issued at) and recent reauthentication timestamp
  • Secure Storage: Store reauthentication state securely (Redis, encrypted cookies)
  • Time Limits: Use appropriate time limits based on operation sensitivity
  • User Experience: Balance security with usability
  • Audit Logging: Log reauthentication attempts and sensitive operations

Rate Limiting

  • Endpoint: 10 requests per 5 minutes per user
  • Purpose: Prevent abuse while allowing legitimate use
  • Headers: Standard rate limiting headers included in response
  • User Profile - May require reauthentication for sensitive data
  • Update Profile - Requires reauthentication for security fields
  • Logout - Alternative to reauthentication for security

Testing