A worked example of Appwrite's OAuth server: one product that acts as an OAuth provider, and another that adds "Sign in with <product>". Built with TanStack Start.
This is the companion code for the guide: Sign in with your product →
Two apps play the two sides of the flow:
| Folder | Product | Role |
|---|---|---|
provider/ |
TaskFlow | Owns the Appwrite project with the OAuth server enabled. Hosts the consent screen where its users sign in and approve access. Runs on http://localhost:4000. |
consumer/ |
Vantage | A separate product that adds "Sign in with TaskFlow". Exchanges the authorization code for tokens on the server. Runs on http://localhost:4100. |
The authorization code flow between them is standard OAuth 2.1, so nothing is Appwrite-specific on the wire. The two pieces this repo builds are the consent screen TaskFlow hosts and the sign-in Vantage adds.
You need Node.js 20+, pnpm, and an Appwrite Cloud project with the OAuth server enabled and a confidential client registered. The guide walks through that setup.
# provider (TaskFlow)
cd provider
cp .env.example .env # fill in your project, endpoint, API key, session secret
pnpm install
pnpm dev # http://localhost:4000
# consumer (Vantage), in a second terminal
cd consumer
cp .env.example .env # fill in your client ID, client secret, session secret
pnpm install
pnpm dev # http://localhost:4100Open http://localhost:4100 and click Sign in with TaskFlow.
MIT