---
title: "Google Callback"
method: GET
path: "/v1/auth/google/callback"
tags: ["auth"]
---

# Google Callback

`GET /v1/auth/google/callback`

## Request

- Base URL: `https://api.ctindex.io`
- URL: `https://api.ctindex.io/v1/auth/google/callback`
- Auth: none declared

Handle the redirect back from Google.

On success: exchanges the code, upserts the user, issues a session
cookie, and 302s to the portal dashboard.  On any failure: 302s to
``/login?error=...`` so the user sees a clean error in the portal
rather than a JSON blob.

## Query parameters

- `code` string, nullable
- `state` string, nullable
- `error` string, nullable

## Cookies

- `ctix_oauth_state` string, nullable
- `ctix_oauth_attr` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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