login

Login Session Oauth

Login via OAuth2.0 authorization code flow with PKCE.

The currently supported OAuth2.0 providers are:

  • Okta
  • Google
get/api/v1/login/session/oauth

Request

  • The document declares no server URL.
  • Auth: none declared

Query parameters

provider'okta' | 'google' required

The OAuth provider. At the moment this defaults to 'okta' but this default will be removed in the future. Please specify the provider explicitly to avoid issues.

account_namestring nullable

The name of the account to validate that the user is authorized to access. If the user does not have access to this account, the endpoint will return a 403 even if the user is successfully authenticated. This is useful for third party applications which want users to be restricted to a particular account.

redirect_headerboolean

Whether to redirect at the HTTP level or not. Browsers set origin=null if a cross-origin resource redirects to yet another origin. This can be problematic for an embedded iframe. Instead, setting redirect to False puts the redirect information in the response body. Then it is up to the client to handle the redirect themselves.

redirect_uristring nullable

The URI to redirect to after the login is complete. This is needed for clients to redirect back to the original page. When OAuth is complete, the user will be redirected to this URI. If the login is successful, a session cookie will be set. If the login is unsuccessful, an error parameter will be set in the redirect_uri query params. If this value is set to None then the redirect_uri will default to https://app.numbersstation.ai/login.

third_partyboolean

Whether to set a third-party cookie for cross-origin iframes.

slack_idstring nullable

An optional base64-encoded Slack {team_id}:{user_id} to link to (for use by the NS Slack App).

Response

Successful Response

string required

Changes

No recorded changes to this operation across all 2 revisions of this API.