Docs
Skip to content

Project

OAuth providers_

Configure OAuth2 sign-in providers for your project from the Console or programmatically with a Server SDK.

4 min read

Raw

OAuth2 providers let your users sign in with accounts they already have, such as GitHub, Google, or Apple. Each provider stores a client ID and client secret at the project level, and can be enabled or disabled independently.

You can configure providers from the Appwrite Console or programmatically with a Server SDK. Each provider has its own update method (updateOAuth2GitHub, updateOAuth2Google, and so on), the read methods listOAuth2Providers and getOAuth2Provider cover all of them.

Configure from the Console

OAuth2 providers in the Appwrite Console
OAuth2 providers in the Appwrite Console

To configure a provider from the Console:

  1. Open your project in the Appwrite Console.
  2. Navigate to Auth in the sidebar, then open the Settings tab.
  3. Find the provider in the OAuth2 Providers list and click it.
  4. Enter the credentials from the provider (the field names vary per provider, see Available providers).
  5. Toggle the provider on and click Update.

Configure a provider

Each provider has a dedicated update method named updateOAuth2<Provider>. The example below configures GitHub. Swap the method name and credential fields to configure a different provider, the field names per provider are listed in Available providers.

Providers with extra fields

Some providers take more than a client ID and secret. Google, for example, accepts an additional prompt parameter that controls the consent screen behavior:

Available providers

Every provider has its own updateOAuth2<Provider> method. The credential field names differ per provider, use the columns below to map the provider's credentials to the method's parameters.

ProviderSDK methodApp ID fieldApp secret fieldOther fields
AmazonupdateOAuth2AmazonclientIdclientSecret
AppleupdateOAuth2AppleserviceIdkeyIdteamId
Auth0updateOAuth2Auth0clientIdclientSecretendpoint
AuthentikupdateOAuth2AuthentikclientIdclientSecretendpoint
AutodeskupdateOAuth2AutodeskclientIdclientSecret
BitbucketupdateOAuth2Bitbucketkeysecret
BitlyupdateOAuth2BitlyclientIdclientSecret
BoxupdateOAuth2BoxclientIdclientSecret
DailymotionupdateOAuth2DailymotionapiKeyapiSecret
DiscordupdateOAuth2DiscordclientIdclientSecret
DisqusupdateOAuth2DisquspublicKeysecretKey
DropboxupdateOAuth2DropboxappKeyappSecret
EtsyupdateOAuth2EtsykeyStringsharedSecret
FacebookupdateOAuth2FacebookappIdappSecret
FigmaupdateOAuth2FigmaclientIdclientSecret
FusionAuthupdateOAuth2FusionAuthclientIdclientSecretendpoint
GitHubupdateOAuth2GitHubclientIdclientSecret
GitLabupdateOAuth2GitlabapplicationIdsecretendpoint
GoogleupdateOAuth2GoogleclientIdclientSecretprompt
KeycloakupdateOAuth2KeycloakclientIdclientSecretendpoint, realmName
KickupdateOAuth2KickclientIdclientSecret
LinkedInupdateOAuth2LinkedinclientIdprimaryClientSecret
MicrosoftupdateOAuth2MicrosoftapplicationIdapplicationSecrettenant
NotionupdateOAuth2NotionoauthClientIdoauthClientSecret
OIDCupdateOAuth2OidcclientIdclientSecretwellKnownURL, authorizationURL, tokenURL, userInfoURL
OktaupdateOAuth2OktaclientIdclientSecretdomain, authorizationServerId
PayPalupdateOAuth2PaypalclientIdsecretKey
PayPal SandboxupdateOAuth2PaypalSandboxclientIdsecretKey
PodioupdateOAuth2PodioclientIdclientSecret
SalesforceupdateOAuth2SalesforcecustomerKeycustomerSecret
SlackupdateOAuth2SlackclientIdclientSecret
SpotifyupdateOAuth2SpotifyclientIdclientSecret
StripeupdateOAuth2StripeclientIdapiSecretKey
TradeshiftupdateOAuth2Tradeshiftenabled only
Tradeshift SandboxupdateOAuth2TradeshiftSandboxenabled only
TwitchupdateOAuth2TwitchclientIdclientSecret
WordPressupdateOAuth2WordPressclientIdclientSecret
XupdateOAuth2XcustomerKeysecretKey
YahooupdateOAuth2YahooclientIdclientSecret
YandexupdateOAuth2YandexclientIdclientSecret
ZohoupdateOAuth2ZohoclientIdclientSecret
ZoomupdateOAuth2ZoomclientIdclientSecret

List providers

List every OAuth2 provider and its current configuration state.

Get a provider

Fetch a single provider's configuration by its provider ID.

Benefits

  • Repeatable provisioning. Script the full set of OAuth2 providers a project needs and recreate it on demand, without clicking through the Console.
  • Environment parity. Keep dev, staging, and production projects in sync by running the same configuration script against each one.
  • Server-only secrets. Client secrets are write-only over the API and never returned in responses, so configuration scripts can run in CI without exposing them.

Was this page helpful?

Share what worked or what we should fix. Once approved, our agents automatically apply suggested updates to the docs.