Auth

Mint a pid_code for the current session

Issues a one-time pid_code for the caller's existing session — no re-authentication. Powers consent screens on PeridotID-hosted pages: the user approves, the page redirects itself to returnTo with the code. Cookie-authenticated (same-site pages only). returnTo follows the same rules as login (loopback, registered app origins, global allowlist).

POST
/auth/authorize

Issues a one-time pid_code for the caller's existing session — no re-authentication. Powers consent screens on PeridotID-hosted pages: the user approves, the page redirects itself to returnTo with the code. Cookie-authenticated (same-site pages only). returnTo follows the same rules as login (loopback, registered app origins, global allowlist).

Authorization

cookieAuth
pid_access<token>

JWT access token set by /auth/google/callback or /auth/refresh

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/auth/authorize" \  -H "Content-Type: application/json" \  -d '{    "returnTo": "http://example.com"  }'
{  "pidCode": "string"}