email-oauth-flows
Production-ready Gmail and Outlook OAuth integration for Next.js with Supabase.
Skill by JimmyBlanquet
Chalk Labs
Need help deploying email-oauth-flows?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/jimmyblanquet-email-oauth-flows
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: frontend, backend, security, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Node.js package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/email-oauth-flows
What's inside
- Skill name
email-oauth-flows- Description
- Production-ready Gmail and Outlook OAuth integration for Next.js with Supabase. Handles email scopes, token refresh, permission management, and secure API access for sending/reading emails.
- License
- MIT
- Instructions
- 494 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (22)
- README.md
- SKILL.md
- 01-gmail-connect.tsx · examples/
- 02-send-gmail.ts · examples/
- 03-outlook-connect.tsx · examples/
- 04-token-refresh.ts · examples/
- 05-email-dashboard.tsx · examples/
- package-lock.json
- package.json
- GMAIL_OAUTH.md · references/
- OUTLOOK_OAUTH.md · references/
- TOKEN_MANAGEMENT.md · references/
- gmail.ts · src/
- index.ts · src/
- outlook.ts · src/
- token-refresh.ts · src/
- types.ts · src/
- index.test.ts · tests/
- token-refresh.test.ts · tests/
- types.test.ts · tests/
- tsconfig.json
- vitest.config.ts
SKILL.md (first lines)
# Email OAuth Flows
Complete Gmail and Outlook OAuth integration for Next.js applications using Supabase Auth with automatic token refresh and email API access.
## When to Use
Use this skill when building Next.js applications that need:
- Gmail OAuth with email scopes (send, read, modify)
- Outlook/Microsoft OAuth with Microsoft Graph API
- Automatic OAuth token refresh
- Secure storage of email credentials
- Send emails via user's Gmail/Outlook account
- Read emails from user's inbox
- Email drafts and compose functionality
**Don't use this skill if:**
- You only need basic auth (email/password)
- You're using a different email service (SendGrid, AWS SES)
- You don't need user's email account access
## Stack
- Next.js 14+ (App Router)
- Supabase Auth (@supabase/ssr)
- Gmail API (Google OAuth)
- Microsoft Graph API (Azure OAuth)
- TypeScript (strict mode)
## Quick Start
### 1. Install Dependencies
```bash
npm install @supabase/ssr @supabase/supabase-js
npm install -D @project-forge/email-oauth-flows
```
### 2. Configure OAuth Providers in Supabase
**Gmail (Google):**
1. Go to [Google Cloud Console](https://console.cloud.google.com)
2. Create OAuth 2.0 credentials
3. Add scopes: `gmail.send`, `gmail.modify`, `gmail.readonly`
4. Add redirect URI: `https://your-project.supabase.co/auth/v1/callback`
5. Copy Client ID & Secret to Supabase Dashboard
**Outlook (Azure):**
1. Go to [Azure Portal](https://portal.azure.com)
2. Register app in Azure Entra ID
3. Add API permissions: `Mail.Read`, `Mail.ReadWrite`, `Mail.Send`
4. Add redirect URI: `https://your-project.supabase.co/auth/v1/callback`
5. Copy Client ID & Secret to Supabase Dashboard
### 3. Setup Environment Variables
```bash
NEXT_PUBLIC_SUPABASE_URL=your-project-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
NEXT_PUBLIC_APP_URL=http://localhost:3000
```
### 4. Implement Gmail OAuth
```typescript
'use client'
import { signInWithGmail } from '@project-forge/email-oauth-flows/gmail'
import { createClient } from '@supabase/supabase-js'
const supabase = createClient(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!
)
export function GmailConnectButton() {
const handleConnect = async () => {
await signInWithGmail(supabase, {
redirectTo: `${process.env.NEXT_PUBLIC_APP_URL}/auth/callback`,
scopes: ['gmail.send', 'gmail.modify', 'gmail.readonly'],
})
}
return <button onClick={handleConnect}>Connect Gmail</button>
}
```
### 5. Handle OAuth Callback
```typescript
// app/auth/callback/route.ts
import { createRouteHandlerClient } from '@supabase/auth-helpers-nextjs'
import { cookies } from 'next/headers'
import { NextResponse } from 'next/server'
export async function GET(request: Request) {
const requestUrl = new URL(request.url)
const code = requestUrl.searchParams.get('code')
if (code) {
const supabase = createRouteHandlerClient({ cookies })
await supabase.auth.exchangeCodeForSession(code)
}
return NextResponse.redirect(new URL('/dashboard', request.url))
}
```
### 6. Send Email via Gmail API
```typescript
import { sendGmailEmail } from '@project-forge/email-oauth-flows/gmail'
const { data, error } = await sendGmailEmail({
accessToken: session.provider_token,
to: 'recipient@example.com',
subject: 'Hello from Gmail',
body: 'This email was sent via Gmail API',
})
```From JimmyBlanquet/project-forge, MIT.
More from JimmyBlanquet/project-forge
- 0.479score
ralph-agent-teams
JimmyBlanquet
Parallel implementation of Ralph++ PRD sub-stories using Claude Opus 4.6 Agent Teams.
SkillCFreshness: CClaude Code +9 - 0.476score
context-maximizer
JimmyBlanquet
Exploit the 1M token context (Opus 4.6 / Sonnet 4.6) for full codebase awareness in SpecKit.
SkillCFreshness: CClaude Code +9 - 0.476score
auth-supabase-complete
JimmyBlanquet
Production-ready Supabase authentication for Next.js 14+ with RLS patterns, session management, OAuth flows, and comprehensive testing.
SkillCFreshness: CClaude Code +9 - 0.474score
ralph-loop
JimmyBlanquet
Use when implementing features autonomously from a prd.json, spawning fresh Task agents per story with quality gates and atomic commits
SkillCFreshness: CClaude Code +9 - 0.474score
dev-pilot
JimmyBlanquet
Full autonomous pipeline orchestrator that loops over features.json and executes the complete development cycle for each feature: spec → plan → tasks →…
SkillCFreshness: CClaude Code +9 - 0.472score
effort-optimizer
JimmyBlanquet
Optimize API costs by adjusting thinking effort per task type.
SkillCFreshness: CClaude Code +9 - 0.471score
config-centralization
JimmyBlanquet
Type-safe, environment-aware configuration management for Next.js/TypeScript applications using a singleton pattern with runtime validation.
SkillCFreshness: CClaude Code +9 - 0.471score
ai-multi-provider
JimmyBlanquet
Multi-provider LLM orchestration system with intelligent routing, fallback chains, cost optimization, and automatic observability.
SkillCFreshness: CClaude Code +9 - 0.471score
logging-structured
JimmyBlanquet
Structured logging with typed contexts for Next.js applications.
SkillCFreshness: CClaude Code +9 - 0.471score
rate-limiting-persistent
JimmyBlanquet
Persistent rate limiting using PostgreSQL for atomic counters.
SkillCFreshness: CClaude Code +9 - 0.470score
speckit-archi-review
JimmyBlanquet
Run an architecture audit on the current project to detect drift, layer violations, ADR non-compliance, and technical debt.
SkillCFreshness: CClaude Code +9 - 0.469score
railway-integration
JimmyBlanquet
Railway deployment configuration for backend services and databases.
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 2
- Last commit (this folder)
- May 10, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/JimmyBlanquet/project-forge
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from JimmyBlanquet
- 0.479score
ralph-agent-teams
JimmyBlanquet
Parallel implementation of Ralph++ PRD sub-stories using Claude Opus 4.6 Agent Teams.
SkillCFreshness: CClaude Code +9 - 0.476score
context-maximizer
JimmyBlanquet
Exploit the 1M token context (Opus 4.6 / Sonnet 4.6) for full codebase awareness in SpecKit.
SkillCFreshness: CClaude Code +9 - 0.476score
auth-supabase-complete
JimmyBlanquet
Production-ready Supabase authentication for Next.js 14+ with RLS patterns, session management, OAuth flows, and comprehensive testing.
SkillCFreshness: CClaude Code +9 - 0.474score
dev-pilot
JimmyBlanquet
Full autonomous pipeline orchestrator that loops over features.json and executes the complete development cycle for each feature: spec → plan → tasks →…
SkillCFreshness: CClaude Code +9 - 0.474score
ralph-loop
JimmyBlanquet
Use when implementing features autonomously from a prd.json, spawning fresh Task agents per story with quality gates and atomic commits
SkillCFreshness: CClaude Code +9 - 0.472score
effort-optimizer
JimmyBlanquet
Optimize API costs by adjusting thinking effort per task type.
SkillCFreshness: CClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get email-oauth-flows running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
email-oauth-flows skill. Agent Mart. https://agentmart.dev/skills/jimmyblanquet-email-oauth-flows (last updated 2026-10-24)