Docs
Skip to content

Auth

Sign in with Appwrite_

Let users sign in to your app with their Appwrite account. Enable the Appwrite OAuth2 provider and create sessions with a consent-based flow.

3 min read

Raw

Sign in with Appwrite lets users log in to your app with their Appwrite account. It works like other OAuth2 providers such as Google or GitHub. Appwrite is the identity provider. This is a good fit when your users are developers, for example when you build developer tools, dashboards, or education platforms.

The provider requests the openid, profile, and email scopes. Appwrite uses them to read the user's ID, name, and email, and to create the session.

Enable the provider

  1. In the Appwrite Console, open your project.
  2. Navigate to Auth > Social providers.
  3. Open the Appwrite provider.
  4. Turn on the Enabled toggle.

Social providers page with the Appwrite provider enabled
Social providers page with the Appwrite provider enabled

Configure credentials

Appwrite OAuth2 settings dialog with quick setup and credentials
Appwrite OAuth2 settings dialog with quick setup and credentials

The provider authenticates through an Appwrite app, which acts as the OAuth2 client. The Appwrite OAuth2 settings dialog gives you two ways to configure it.

Quick setup creates the app for you:

  1. In the Create app tab, enter an app name.
  2. Click Create and fill credentials.
  3. Click Update to save the provider settings.

Appwrite creates the app in your organization, registers the redirect URI, and fills the Client ID and Client Secret fields. To reuse an app you registered before, use the Select app tab instead.

You can also enter credentials manually:

  1. Register an app in your organization.
  2. Add the redirect URI shown in the dialog to the app.
  3. Paste the app's client ID and secret into the fields.
  4. Click Update.

Initialize the sign-in

Start the flow from your app with the Appwrite provider. The user is redirected to Appwrite to approve the request, then redirected back to your app with an active session.

Appwrite asks the user to sign in to their Appwrite account if they have no active session. The consent screen then shows your app's name and the requested permissions. When the user clicks Authorize, Appwrite redirects them back to your app and the session is active. Users can revoke access from their Appwrite account at any time.

Consent screen asking the user to authorize the app
Consent screen asking the user to authorize the app

Like all OAuth2 logins, a successful sign-in creates an identity for the user. To read provider details from the session or refresh tokens, see OAuth2 login.

Was this page helpful?

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