---
title: "Spaces Google Auth"
method: POST
path: "/api/v1/quick-spaces/auth/google"
tags: ["quickSpaces", "quickSpaces"]
---

# Spaces Google Auth

`POST /api/v1/quick-spaces/auth/google`

Sign in OR sign up with a Google ID token - the THIRD door in, next to signup/login.

An existing account signs in with no invite needed (a live Google token is proof of the mailbox
right now); a brand-new address still needs a valid, matching invite - refused with the same
404 "Invite not found" / INVITE_EMAIL_MISMATCH signup uses. See
views/quickSpaces/spaces_auth.py google_auth() for the full contract. May return a JSONResponse
instead of the declared model for a 429, same reason as /auth/login.

## Request body

- SpacesGoogleAuthRequestDTO — Body of POST /auth/google — the THIRD door in, next to signup/login. Handles both sign-in (an existing users row) and sign-up (an invited address with no row yet) behind one endpoint, because the caller can't know which one applies until the server has verified the token and looked the email up. See views/quickSpaces/spaces_auth.py google_auth() for the full contract.
  - `id_token` string, required
  - `invite_token` string, nullable
  - `name` string, nullable

## Response `200`

Successful Response

- SpacesAuthResponseDTO — The result of POST /auth/signup and POST /auth/login. `token` is a MONOLITH JWT (utils/JWTBearer verifies it with the shared config.JWT_SECRET), so it is returned in the response BODY and never in a URL, a query string or a redirect.
  - `token` string, required
  - `token_type` string
  - `expires_in` integer, required
  - `id` string, required
  - `email` string, required
  - `name` string, required
  - `login_method` string, required
  - `workspace_id` string
  - `role` string
  - `needs_invite` boolean

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/brandbooster/apis/fastapi.md) · [All operations](https://skmtc.dev/brandbooster/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/brandbooster/fastapi/revisions/624917d53409/schema)
