oauth 모드에서 Google을 OAuth 공급자로 사용하는 설정입니다.
google-oauth/
├── README.md
├── frontend/
│ └── .env.example # Chat UI 환경변수
└── server/
├── graph.py
├── auth.py # JWT 토큰 검증
├── langgraph.json
├── .env.example
└── pyproject.toml
- Google Cloud Console 접속
- APIs & Services > Credentials > Create Credentials > OAuth client ID
- Authorized redirect URIs:
http://localhost:3000/api/auth/callback/google
cd examples/google-oauth/server
cp .env.example .env
# NEXTAUTH_SECRET, ANTHROPIC_API_KEY 설정
pip install -e ".[dev]"
langgraph devcd frontend
cp ../examples/google-oauth/frontend/.env.example .env
# 설정:
# - NEXTAUTH_SECRET (서버와 동일!)
# - GOOGLE_CLIENT_ID
# - GOOGLE_CLIENT_SECRET
pnpm install
npx prisma generate && npx prisma db push
pnpm devhttp://localhost:3000접속- "Google로 로그인" 클릭
사용자 → "Google 로그인" → Google OAuth
↓
NextAuth.js → JWT 토큰 발급
↓
LangGraph 서버 (auth.py에서 JWT 검증)