Skip to main content
POST
/
v2
/
session
/
apps
/
{appID}
/
config
/
login
/
oauth
/
{provider}
Create OAuth login config
curl --request POST \
  --url https://api.prelude.dev/v2/session/apps/{appID}/config/login/oauth/{provider} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "client_id": "<string>",
  "client_secret": "<string>",
  "enabled": true,
  "scopes": [
    "<string>"
  ],
  "granted_scopes": [
    "<string>"
  ],
  "options": {
    "use_email_as_identifier": true,
    "allow_email_account_merge": true,
    "verify_email": true
  },
  "apple": {
    "team_id": "<string>",
    "key_id": "<string>",
    "p8_key": "<string>"
  },
  "okta": {
    "issuer_url": "<string>"
  }
}
'
{
  "config": {
    "provider_id": "<string>",
    "client_id": "<string>",
    "enabled": true,
    "scopes": [
      "<string>"
    ],
    "options": {
      "use_email_as_identifier": true,
      "allow_email_account_merge": true,
      "verify_email": true
    },
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "granted_scopes": [
      "<string>"
    ],
    "apple": {
      "team_id": "<string>",
      "key_id": "<string>",
      "p8_key": "<string>"
    },
    "okta": {
      "issuer_url": "<string>"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

appID
string
required

The id of the app the request refers to. An application's unique identifier.

Examples:

"54e9ujn"

"fvua38g"

provider
string
required

The OAuth provider identifier.

Examples:

"google"

"apple"

"github"

"okta"

"facebook"

Body

application/json
client_id
string
required
Example:

"123456789.apps.googleusercontent.com"

client_secret
string
required
Example:

"GOCSPX-abc123def456"

enabled
boolean
Example:

true

scopes
string[]

Scopes requested from the OAuth provider (IdP).

granted_scopes
string[]

Prelude session scopes attached to the session when a login completes through this social provider (for example prld:pwd:write). Distinct from scopes, which are requested from the IdP.

Example:
["prld:pwd:write"]
options
object
apple
object
okta
object

Response

Created

config
object
required