Auth

Start OAuth login flow (primary auth)

Redirects unauthenticated user to OAuth provider (e.g. Google, GitHub, Twitter) for sign-in. After callback, user receives JWT via redirect.

get/auth/{provider}/login

Request

  • Base URL: https://api.tinyhumans.ai
  • URL: https://api.tinyhumans.ai/auth/{provider}/login
  • Auth: none declared

Path parameters

provider'google' | 'github' | 'twitter' | 'discord' required

Query parameters

redirect'app' | 'dashboard' | 'admin' | 'cli' | 'guild'

Named redirect target after login (app = desktop, dashboard = website, admin = admin dashboard, cli = terminal, guild = the Discord guild dashboard). guild is only valid with the discord provider: the callback does not issue a session but mints a guild link token for the new or existing account and redirects to GUILD_URL/link#token=..., where the guild dashboard opens its own session for the verified Discord account and links it. This is how a member registers through Discord OAuth from the guild. cli does not redirect: the callback renders a page showing a one-time login token for the user to paste into a terminal that cannot host the loopback listener (e.g. over SSH). The terminal exchanges it via POST /auth/login-token/consume.

redirectUristring

Redirect URI the callback returns to verbatim, with token/error/key appended, instead of the default openhuman:// deep link. Two shapes are accepted: an RFC 8252 loopback URI (e.g. http://127.0.0.1:53824/auth?state=...), or an https URI whose origin is a provisioned hosted OpenCompany tenant (e.g. https://acme.opencompany.ai/?company=acme). Anything else is a 400.

product'OPENHUMAN' | 'OPENCOMPANY' | 'MEDULLA'

Product this login should be attributed to (tinyhumansai/backend#1214). Case-insensitive. Carried through the OAuth state and recorded on the user (sticky, additive) once the callback completes. Omit for no attribution.

Changes

No recorded changes to this operation across all 1 revision of this API.