curl -X POST "https://api.chronos.app/auth/web/callback" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"code": "4/0AeanS0ZZ9K..."
}'
{
"user": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"email": "[email protected]",
"name": "Jane Doe",
"avatar_url": "https://lh3.googleusercontent.com/a/...",
"created_at": "2026-03-04T10:30:00.000Z"
},
"expires_at": 1709553000
}
Exchanges the OAuth authorization code for session tokens and creates user session cookies.
curl -X POST "https://api.chronos.app/auth/web/callback" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"code": "4/0AeanS0ZZ9K..."
}'
{
"user": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"email": "[email protected]",
"name": "Jane Doe",
"avatar_url": "https://lh3.googleusercontent.com/a/...",
"created_at": "2026-03-04T10:30:00.000Z"
},
"expires_at": 1709553000
}
Show User Object
curl -X POST "https://api.chronos.app/auth/web/callback" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"code": "4/0AeanS0ZZ9K..."
}'
{
"user": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"email": "[email protected]",
"name": "Jane Doe",
"avatar_url": "https://lh3.googleusercontent.com/a/...",
"created_at": "2026-03-04T10:30:00.000Z"
},
"expires_at": 1709553000
}
SESSION_COOKIE_NAME (typically __Host-session in production).COOKIE_MAX_AGE configREFRESH_COOKIE_NAME (typically __Host-refresh).COOKIE_MAX_AGE configCSRF_COOKIE_NAME.CSRF_TOKEN_TTL_SECONDS configRATE_LIMIT_AUTH configuration. The rate limiter uses the client’s IP address as the key.
google_accounts tablecredentials: 'include' option must be set when calling this endpoint from JavaScript to ensure cookies are properly sent and received.backend/app/routers/auth.py:179-204