Local GoTrue signs JWTs with HS256, but the JWKS endpoint returns an empty key set since there are no RSA keys. Fall back to HS256 shared secret verification when JWKS fails, using SUPABASE_JWT_SECRET. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
27 lines
634 B
Python
27 lines
634 B
Python
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(
|
|
env_file=".env",
|
|
env_file_encoding="utf-8",
|
|
extra="ignore",
|
|
)
|
|
|
|
app_name: str = "Another Nuzlocke Tracker API"
|
|
debug: bool = False
|
|
|
|
# API settings
|
|
api_v1_prefix: str = "/api/v1"
|
|
|
|
# Database settings
|
|
database_url: str = "postgresql+asyncpg://postgres:postgres@localhost:5432/nuzlocke"
|
|
|
|
# Supabase Auth
|
|
supabase_url: str | None = None
|
|
supabase_anon_key: str | None = None
|
|
supabase_jwt_secret: str | None = None
|
|
|
|
|
|
settings = Settings()
|