Docs
Skip to content

Sign in with your product

Enable the OAuth2 server_

Turn on the OAuth2 server on your Appwrite project and register the client app.

2 min read

Raw

Before writing any code, turn TaskFlow's project into an OAuth provider and register Vantage as a client.

Enable the server

Enabling the OAuth2 server in the Appwrite Console
Enabling the OAuth2 server in the Appwrite Console

In the Console, open Auth, select the OAuth2 server tab, and turn on Enable OAuth2 server.

Set the Authorization URL to where TaskFlow will host its consent screen. In this tutorial that is http://localhost:4000/oauth/consent. This is where the OAuth2 server sends users to sign in and approve.

Leave the scopes at their defaults. openid, profile, email, and phone are always included, and Vantage only needs the first three. See Scopes to add your own later.

Register the client

Creating the Vantage client in the Appwrite Console
Creating the Vantage client in the Appwrite Console

Open the Apps sub-tab and create a client for Vantage:

  • Name: Vantage. This appears on the consent screen.
  • Client type: Confidential. Vantage has a server that can hold a secret.
  • Redirect URIs: http://localhost:4100/oauth/callback. The OAuth2 server only returns codes to registered URIs.

When you create the client, copy the client secret. It is shown once. You will also need the client ID from the clients list.

The client secret shown once on creation
The client secret shown once on creation

For the full set of client options and the SDK equivalents, see Clients.

Continue to scaffold the two apps.

Was this page helpful?

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