PearPear

Redeem a finished X sign-in

Exchanges the single-use ticket from the callback for a session, proving this is the browser that started the sign-in by presenting the verifier behind its challenge. Returns the token pair in the body and sets the session cookies, so bearer and cookie clients are both served.

POST
/auth/login/x/exchange

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Redemption of a finished X sign-in for a session

Response Body

application/json

curl -X POST "https://example.com/auth/login/x/exchange" \  -H "Content-Type: application/json" \  -d '{    "ticket": "string",    "handoffVerifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"  }'
{  "accessToken": "string",  "refreshToken": "string",  "user": {    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",    "role": "basic",    "providerId": "string",    "loginMethod": "email"  }}