fix: enhance OAuth configuration and add debugging - Add Google OAuth authorization parameters - Add environment variable validation - Add debugging logs for redirect callback - Create OAuth configuration check script

This commit is contained in:
theshy
2025-08-01 20:42:03 +08:00
parent 2cd0ebda65
commit e955f4c317
8 changed files with 195 additions and 358 deletions

View File

@ -2,11 +2,8 @@
DATABASE_URL="file:./dev.db"
# NextAuth.js
# 重要:确保 URL 不包含多余的引号,格式应为:https://your-domain.com
NEXTAUTH_URL="https://recorder.zyj.best"
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-nextauth-secret"
# 可选:设置 Cookie 域名(生产环境)
NEXTAUTH_COOKIE_DOMAIN="recorder.zyj.best"
# Google OAuth
GOOGLE_CLIENT_ID="your-google-client-id"