TrieOH
IdentityXAPIAuthn

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).

GET/auth/{provider}/callback

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).

Path Parameters

provider*string

Social identity provider

Query Parameters

code*string

Authorization code issued by the provider.

state*string

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/json

application/json

application/json

application/json

curl -X GET "https://example.com/auth/google/callback?code=string&state=string"
{
  "code": 200,
  "message": "string",
  "error": {
    "code": "BAD_REQUEST",
    "message": "string",
    "fields": [
      {
        "field": "string",
        "message": "string"
      }
    ],
    "meta": {},
    "debug": {
      "raw_error": "string",
      "stack_trace": "string"
    }
  },
  "pagination": {
    "page": 1,
    "limit": 1,
    "total": 0,
    "has_next": true,
    "has_prev": true,
    "next_page": 0,
    "prev_page": 0
  },
  "timestamp": "2019-08-24T14:15:22Z",
  "module": "string",
  "data": {
    "access_token": "string",
    "refresh_token": "string",
    "access_expires_at": "2019-08-24T14:15:22Z",
    "refresh_expires_at": "2019-08-24T14:15:22Z",
    "domain": "string"
  }
}
{
  "code": 0,
  "message": "string",
  "error": {
    "code": "BAD_REQUEST",
    "message": "string",
    "fields": [
      {
        "field": "string",
        "message": "string"
      }
    ],
    "meta": {},
    "debug": {
      "raw_error": "string",
      "stack_trace": "string"
    }
  },
  "timestamp": "2019-08-24T14:15:22Z",
  "module": "IdentityX"
}
{
  "code": 0,
  "message": "string",
  "error": {
    "code": "BAD_REQUEST",
    "message": "string",
    "fields": [
      {
        "field": "string",
        "message": "string"
      }
    ],
    "meta": {},
    "debug": {
      "raw_error": "string",
      "stack_trace": "string"
    }
  },
  "timestamp": "2019-08-24T14:15:22Z",
  "module": "IdentityX"
}
{
  "code": 0,
  "message": "string",
  "error": {
    "code": "BAD_REQUEST",
    "message": "string",
    "fields": [
      {
        "field": "string",
        "message": "string"
      }
    ],
    "meta": {},
    "debug": {
      "raw_error": "string",
      "stack_trace": "string"
    }
  },
  "timestamp": "2019-08-24T14:15:22Z",
  "module": "IdentityX"
}
{
  "code": 0,
  "message": "string",
  "error": {
    "code": "BAD_REQUEST",
    "message": "string",
    "fields": [
      {
        "field": "string",
        "message": "string"
      }
    ],
    "meta": {},
    "debug": {
      "raw_error": "string",
      "stack_trace": "string"
    }
  },
  "timestamp": "2019-08-24T14:15:22Z",
  "module": "IdentityX"
}