fix(admin): RLS 재귀 수정 + OAuth 쿠키 + 코드 정리

- RLS: profiles 재귀 참조 → app_metadata 기반으로 교체
- auth callback: 쿠키를 response에 직접 설정 (세션 유지)
- middleware: Supabase 세션 갱신 추가
- layout: requireAdmin() 사용으로 통합 (중복 제거)
- admin-guard: app_metadata.role 기반 (JWT, DB 쿼리 불필요)
- debug 라우트 제거
- config.toml: localhost:3000/3001 redirect URL 추가
This commit is contained in:
윤찬 2026-04-12 20:52:56 +09:00
parent 46673ee941
commit eb4c504fea
7 changed files with 142 additions and 53 deletions

View file

@ -42,6 +42,8 @@ enabled = true
site_url = "http://localhost:5173"
additional_redirect_urls = [
"http://localhost:5173",
"http://localhost:3000",
"http://localhost:3001",
"https://d3ro.dev",
"d3ro-voice://auth-callback"
]