---
title: "Sign in with Google"
method: POST
path: "/auth/google"
tags: ["Auth"]
---

# Sign in with Google

`POST /auth/google`

## Request

- Base URL: `https://foresea.ink` (the document declares no server; this is the origin it was published from)
- URL: `https://foresea.ink/auth/google`
- Auth: none declared

Verify a Google One-Tap ID token, create or update the user account, and return a session token.

The browser should send the `credential` string returned by
`google.accounts.id.initialize({ callback })` after the user grants consent.
Store the returned `token` in `localStorage` and include it as
`Authorization: Bearer <token>` on subsequent authenticated requests.

## Request body

- GoogleAuthRequest: Google One-Tap credential submitted by the browser.
  - `credential` string, required

## Response `200`

Successful Response

- SessionResponse: Issued after a successful Google sign-in.
  - `token` string, required
  - `user_id` string, required
  - `email` string, required
  - `name` string, required
  - `picture` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/foresea/apis/foresea-intelligence-api.md) · [All operations](https://skmtc.dev/foresea/apis/foresea-intelligence-api/llms.txt) · [OpenAPI document](https://skmtc.dev/foresea/apis/foresea-intelligence-api/revisions/b03e49f4385d?raw)
