Conclude a social login
Receives the callback from the social login redirect, exchanges the authorization `code` for tokens, and finishes user authentication. Returns the token pair with 201 on first-time OAuth logins (account created implicitly).
/auth/{provider}/callbackReceives the callback from the social login redirect, exchanges
the authorization code for tokens, and finishes user
authentication. Returns the token pair with 201 on first-time
OAuth logins (account created implicitly).
Path Parameters
Social identity provider
Query Parameters
Authorization code issued by the provider.
Opaque state token issued by /auth/{provider}/connect. Carries
the login attempt (scope, provider) back from the provider and
is consumed by this callback.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://example.com/auth/google/callback?code=string&state=string"{
"access_token": "string",
"refresh_token": "string",
"access_expires_at": "2019-08-24T14:15:22Z",
"refresh_expires_at": "2019-08-24T14:15:22Z",
"domain": "string"
}{
"detail": "string",
"instance": "../dictionary",
"errors": [
{
"field": "string",
"message": "string"
}
],
"type": "http://example.com",
"status": 400,
"title": "Validation Failed"
}{
"detail": "string",
"instance": "../dictionary",
"errors": [
{
"field": "string",
"message": "string"
}
],
"type": "http://example.com",
"status": 401,
"title": "Unauthenticated"
}{
"detail": "string",
"instance": "../dictionary",
"errors": [
{
"field": "string",
"message": "string"
}
],
"type": "http://example.com",
"status": 500,
"title": "Internal Server Error"
}{
"detail": "string",
"instance": "../dictionary",
"errors": [
{
"field": "string",
"message": "string"
}
],
"type": "http://example.com",
"status": 503,
"title": "Identity Unavailable"
}Start a social login GET
Starts the social login process for the given provider (`google` or `github`) and returns the redirect URL the client should send the user to. After the user authorizes, the provider redirects back to `/auth/{provider}/callback?code=...`.
Discover enabled social login providers GET
Public discovery of the OAuth providers a scope currently accepts logins with. With `project_id`, returns the project's enabled providers; without it, IdentityX's own platform providers (env-configured). The frontend login modal renders one button per returned provider.