Oauth

Update an OAuth provider

Changed on

Updates an existing OAuth provider. Only the values provided will be updated.

patch/oauth-providers/{user_id}/{provider_id}

Request

  • Base URL
    https://api.hexclave.com/api/v1
  • URL
    https://api.hexclave.com/api/v1/oauth-providers/{user_id}/{provider_id}
  • Auth
    none declared

Path parameters

provider_idstring required
user_idstring required

The ID of the user, or the special value me for the currently authenticated user

Example:3241a285-8329-4d69-8f3d-316e08cf140c

Request body

emailstring

Email of the OAuth provider. This is used to display and identify the OAuth provider in the UI.

account_idstring

Account ID of the OAuth provider. This uniquely identifies the account on the provider side.

allow_sign_inboolean

Whether the user can use this OAuth provider to sign in. Only one OAuth provider per type can have this set to true.

allow_connected_accountsboolean

Whether the user can use this OAuth provider as connected account. Multiple OAuth providers per type can have this set to true.

Example request

{
  "email": "test@gmail.com",
  "account_id": "google-account-id-12345",
  "allow_sign_in": true,
  "allow_connected_accounts": true
}

Response

Successful response

account_idstring required

Account ID of the OAuth provider. This uniquely identifies the account on the provider side.

user_idstring required

The ID of the user, or the special value me for the currently authenticated user

idstring required

The unique identifier of the OAuth provider

emailstring

Email of the OAuth provider. This is used to display and identify the OAuth provider in the UI.

provider_config_idstring required

Provider config ID of the OAuth provider. This uniquely identifies the provider config on config.json file

type'google' | 'github' | 'microsoft' | 'spotify' | 'facebook' | 'discord' | 'gitlab' | 'bitbucket' | 'linkedin' | 'apple' | 'x' | 'twitch' required

OAuth provider type, one of google, github, microsoft, spotify, facebook, discord, gitlab, bitbucket, linkedin, apple, x, twitch

allow_sign_inboolean required

Whether the user can use this OAuth provider to sign in. Only one OAuth provider per type can have this set to true.

allow_connected_accountsboolean required

Whether the user can use this OAuth provider as connected account. Multiple OAuth providers per type can have this set to true.

Example response

{
  "account_id": "google-account-id-12345",
  "user_id": "3241a285-8329-4d69-8f3d-316e08cf140c",
  "id": "b3d396b8-c574-4c80-97b3-50031675ceb2",
  "email": "test@gmail.com",
  "provider_config_id": "google",
  "type": "google",
  "allow_sign_in": true,
  "allow_connected_accounts": true
}

Changes

    • warning

      added the new apple enum value to the response property for the response status

    • warning

      added the new bitbucket enum value to the response property for the response status

    • warning

      added the new discord enum value to the response property for the response status

    • warning

      added the new facebook enum value to the response property for the response status

    • warning

      added the new github enum value to the response property for the response status

    • warning

      added the new gitlab enum value to the response property for the response status

    • warning

      added the new google enum value to the response property for the response status

    • warning

      added the new linkedin enum value to the response property for the response status

    • warning

      added the new microsoft enum value to the response property for the response status

    • warning

      added the new spotify enum value to the response property for the response status

    • warning

      added the new twitch enum value to the response property for the response status

    • warning

      added the new x enum value to the response property for the response status