Appwrite sign-in: Google, Apple, Facebook, and OTP

One place for enabling Google, Apple, Facebook, and email OTP sign-in in Appwrite: console settings, provider credentials, redirect URLs, and what to wire in your app.

By Cristian Muscalu ·

Before you start

These steps assume you already have an Appwrite project. Open Auth in your Appwrite console for the project you want to configure. Keep each provider’s client ID and secret only in Appwrite — do not commit them to git.

Google sign-in

In Appwrite, enable Google under Auth → Settings. In Google Cloud Console, create an OAuth client ID (APIs & Services → Credentials). Add the Authorized redirect URI that Appwrite shows for the Google provider (it looks like /v1/account/sessions/oauth2/callback/google/<project-id> on your Appwrite host). Paste the Google client ID and secret back into Appwrite and save.

Facebook sign-in

Create an app at developers.facebook.com, complete the basic setup, and copy the App ID and App Secret. In the Facebook Login settings, add the Appwrite OAuth redirect URL for Facebook. Enable Facebook in Appwrite Auth and paste the App ID and secret.

Sign in with Apple

In Apple Developer, enable Sign in with Apple on your app identifier, create a Services ID for the web OAuth flow, and create a private key with Sign in with Apple enabled (download the .p8 once and store it safely). In Appwrite, enable Apple and paste the Services ID, Team ID, Key ID, and full private key. In your app, start the OAuth session through Appwrite the same way as other providers. For App Review, note that Apple login uses the same account flow and supports Apple privacy features.

OTP / email codes via SMTP

Appwrite can send one-time passwords over email when SMTP is configured. Create an app password for the mailbox you will use (for Google accounts: Google Account → App passwords). In Appwrite project settings → SMTP, add the host, port, user, and password. Then enable the email/OTP auth options you need in Auth settings.

In your app

After a provider is enabled, trigger account.createOAuth2Session (or the SDK equivalent) with that provider name, and handle the redirect back to your app. Show third-party buttons as equal options when you offer more than one.