gainforest-oauth-setup
Installation
SKILL.md
GainForest OAuth Implementation
Step-by-step instructions for implementing ATProto OAuth in a Next.js (App Router) application using gainforest-sdk-nextjs.
When to Apply
Use this skill when:
- Adding OAuth/authentication to a Next.js app using
gainforest-sdk-nextjs - Setting up login/logout flows for ATProto PDS accounts
- Integrating with climateai.org or gainforest.id PDS servers
- Configuring session management with iron-session + Supabase
Prerequisites
Before starting, verify:
- The project is a Next.js App Router application
gainforest-sdk-nextjsand@supabase/supabase-jsare installed (if not, runnpm install gainforest-sdk-nextjs @supabase/supabase-js)- A Supabase project exists with two required tables:
atproto_oauth_sessionandatproto_oauth_state. If these tables do not exist yet, create them first using the SQL in references/supabase-tables.md