Skip to content
SupportDashboard

Sign up with OAuth provider

GET
/signup/provider/{provider}

Initiate OAuth signup flow with the specified provider. Redirects to the provider’s authorization page. Use this endpoint to explicitly register a new account. When AUTH_DISABLE_AUTO_SIGNUP is enabled, this is the only way to register through this method. If the user already exists at callback time, they are redirected with error=user-already-exists.

provider
required
string
Allowed values: apple github google linkedin discord spotify twitch gitlab bitbucket workos azuread entraid strava facebook windowslive twitter

The name of the social provider

allowedRoles
Array<string>
Example
[
"me",
"user"
]

Array of allowed roles for the user

defaultRole
string
Example
user

Default role for the user

displayName
string
<= 32 characters /^[\p{L}\p{N}\p{S} ,.'-]+$/
Example
John Smith

Display name for the user

locale
string
>= 2 characters <= 3 characters
Example
en

A two or three characters locale

metadata
object
key
additional properties
any
Example
{
"firstName": "John",
"lastName": "Smith"
}

Additional metadata for the user (JSON encoded string)

redirectTo
string format: uri
Example
https://my-app.com/catch-redirection

URI to redirect to

state
string

Opaque state value to be returned by the provider

providerSpecificParams

Additional provider-specific parameters

object
connection

(workos) Specifies the connection to use for authentication

string
organization

(workos) Specifies the organization to use for authentication

string
upstreamParams

Extra parameters forwarded to the upstream OAuth2 provider’s authorization URL. Reserved OAuth2/OIDC parameters are rejected.

Extra parameters forwarded to the upstream OAuth2 provider’s authorization URL (e.g. Google’s prompt or login_hint). Reserved OAuth2/OIDC parameters are rejected.

object
key
additional properties
string
codeChallenge
string
>= 43 characters <= 43 characters /^[A-Za-z0-9_-]{43}$/

PKCE code challenge (S256). When provided, the callback redirect will contain an authorization code instead of a refresh token.

Redirect to social provider

Location
required
string format: uri

URL to redirect to

An error occurred while processing the request

Standardized error response

object
status
required

HTTP status error code

integer
Example
400
message
required

Human-friendly error message

string
Example
Invalid email format
error
required

Error code identifying the specific application error

string
Allowed values: default-role-must-be-in-allowed-roles disabled-endpoint disabled-user user-already-exists email-already-verified forbidden-anonymous internal-server-error invalid-email-password invalid-request locale-not-allowed password-too-short password-in-hibp-database redirectTo-not-allowed role-not-allowed signup-disabled unverified-user user-not-anonymous invalid-pat invalid-refresh-token invalid-ticket disabled-mfa-totp no-totp-secret invalid-totp mfa-type-not-found totp-already-active invalid-state oauth-token-echange-failed oauth-profile-fetch-failed oauth-provider-error invalid-otp otp-too-many-attempts cannot-send-sms provider-account-already-linked