Gamma API
AuthenticationSingle sign-on

Sign in through an organization's SSO

POST
/api/auth/sign-in/sso

This endpoint is used to sign in with an SSO provider. It redirects to the provider's authorization URL

Authorization

session
cookiegamma.session_token<token>

The session cookie a sign-in sets. Over HTTPS its name carries the __Secure- prefix. Browsers send it on their own; other clients keep it from the sign-in response.

Request Body

application/json
  1. body
email?string

The email address to sign in with. Used to resolve the provider via the email domain; optional if providerId, domain, or organizationSlug is provided.

organizationSlug?string

The slug of the organization to sign in with.

providerId?string

The ID of the provider to sign in with. Can be provided instead of email.

domain?string

The email domain of the provider. Can be provided instead of email.

callbackURL*string

The URL to redirect to after successful sign-in.

errorCallbackURL?string

The URL to redirect to if the sign-in flow fails.

newUserCallbackURL?string

The URL to redirect to after sign-in if the user is newly registered.

scopes?array<string>

Scopes to request from the provider.

loginHint?string

Login hint to send to the identity provider (e.g., email or identifier). If supported, sent as 'login_hint'.

additionalParams?

Extra query parameters to append to the OIDC provider authorization URL. RFC 6749 reserved keys (state, client_id, redirect_uri, response_type, code_challenge, code_challenge_method, scope) are rejected. Not supported for SAML providers.

requestSignUp?boolean

Explicitly request sign-up. Useful when disableImplicitSignUp is true for this provider.

providerType?string

The provider protocol to sign in with.

Value in"oidc""saml"

Response Body

Authorization URL generated successfully for SSO sign-in

application/json
  1. response
url*string

The authorization URL to redirect the user to for SSO sign-in

Formaturi
redirect*true

Indicates that the client should redirect to the provided URL

Value intrue
Example Request
curl -X POST 'http://localhost:3000/api/auth/sign-in/sso' \  -H 'Content-Type: application/json' \  -d '{  "callbackURL": "string"}'
Example Response
{  "url": "http://example.com",  "redirect": true}