GET
/
api
/
v1
/
auth
/
callback
Handles the callback from Auth0 OAuth 2.0 authentication flow. This endpoint receives the authorization code from Auth0, exchanges it for tokens, and creates or authenticates the user in the system.

Flow

  1. Auth0 redirects the user to this endpoint with a code and state parameter
  2. Server validates the state parameter to prevent CSRF attacks
  3. Server exchanges the code for access and ID tokens
  4. Server validates the ID token and extracts user information
  5. Server creates or updates the user record
  6. Server redirects to the original redirect_uri with authentication token
No authentication is required to access this endpoint.

Parameters

code
string
required
Authorization code provided by Auth0
state
string
required
State token for CSRF protection validation

Response

Returns a 302 redirect to the application with token and project ID as query parameters.