---
title: "Update an OAuth provider"
method: PATCH
path: "/oauth-providers/{user_id}/{provider_id}"
tags: ["Oauth"]
---

# Update an OAuth provider

`PATCH /oauth-providers/{user_id}/{provider_id}`

Updates an existing OAuth provider for a user.

## Path parameters

- `provider_id` string, required
- `user_id` string, required — The ID of the user, or the special value `me` for the currently authenticated user

## Request body

- object
  - `allow_sign_in` boolean — 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_accounts` boolean — Whether the user can use this OAuth provider as connected account. Multiple OAuth providers per type can have this set to `true`.

## Response `200`

Successful response

- object
  - `user_id` string, required — The ID of the user, or the special value `me` for the currently authenticated user
  - `id` string, required — The unique identifier of the OAuth provider
  - `email` string — Email of the OAuth provider. This is used to display and identify the OAuth provider in the UI.
  - `provider_config_id` string, 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_in` boolean, 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_accounts` boolean, required — Whether the user can use this OAuth provider as connected account. Multiple OAuth providers per type can have this set to `true`.

---

[API](https://skmtc.net/hexclave/apis/hexclave-rest-api.md) · [All operations](https://skmtc.net/hexclave/apis/hexclave-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hexclave/hexclave-rest-api/versions/86dcd8c9953c/schema)
