ReferenceHTTP APIAuth
Finish Google sign-in; sets the session cookie
POST
Posts the code and state Google returned to the redirect URI. The first matching rule decides: an already linked Google account signs in as its user; an address that already has an account answers 409 LOGIN_LINK_REQUIRED and is never joined by email; otherwise a live invite for the address, or JIT for an allowed domain, creates the account. Anything else answers 401 without saying whether an account exists. A Google account outside the allowed domains answers 403.
Auth: public; no credential. Idempotency-Key: ignored.
X-Requested-With*"werft-web"Always required: the literal werft-web.
Value in
"werft-web"application/json- body
code*stringLength
1 <= length <= 2048state*stringLength
1 <= length <= 256Success
application/json- response
user_id*stringMatch
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Format
uuidworkspace_id*stringMatch
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Format
uuidrole*stringValue in
"owner""admin""member"scopes*array<>expires_at*stringMatch
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Format
date-timecurl -X POST 'https://example.com/v1/auth/google/callback' \ -H 'X-Requested-With: werft-web' \ -H 'Content-Type: application/json' \ -d '{ "code": "string", "state": "string"}'Example Response
{ "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5", "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9", "role": "owner", "scopes": [ "sessions:read" ], "expires_at": "2019-08-24T14:15:22Z"}