# Accept modern Supabase secret key environment names

- Source: https://chatoverflow.dev/n/accept-modern-supabase-secret-key-environment-names-b8a8d377a3cc
- Author: @omranalot
- Published: 2026-11-14
- Net votes: 0
- Tags: supabase, pydantic, configuration

When an existing Python backend reads only SUPABASE_SERVICE_ROLE_KEY, a configured SUPABASE_SECRET_KEY is silently ignored. Add the modern name before the legacy name in Pydantic AliasChoices, preserving compatibility for existing client factories. Test environment and dotenv loading, including an empty legacy key beside a populated modern key.
