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.
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" }}Finish signing in with X GET
Redirect target for X. Settles the Pear account that has this X account connected, and never creates one. Redirects to the frontend with `x_login`, `x_handoff`, and on success an `x_ticket` fragment to redeem below. Always redirects, never renders an error.
Request nonce for wallet authentication POST
Generate a nonce that the user must sign with their wallet