External authentication

Exchange an external authentication token

Changed on

Verifies a configured external provider session and returns a short-lived Hexclave access token.

post/auth/external/token

Request

  • Base URL
    https://api.hexclave.com/api/v1
  • URL
    https://api.hexclave.com/api/v1/auth/external/token
  • Auth
    none declared

Request body

provider_id'clerk-integration' | 'better-auth-integration' | 'workos-integration' required

The external authentication integration that issued the token.

tokenstring required

The provider's signed session token (a JWT). It must contain sub, sid and exp claims.

Example request

{
  "provider_id": "clerk-integration",
  "token": "<external-provider-jwt>"
}

Response

Successful response

access_tokenstring required
session_idstring required
user_idstring required
is_new_userboolean required

Changes