You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: rename anon key → publishable key, service role key → secret key (#1360)
* feat: rename anon key to publishable key and service role key to secret key
Renames all references to align with Supabase's updated key naming convention:
- `anonKey` parameter → `publishableKey` in Supabase.initialize() and _init()
- `supabaseAnonKey` → `supabasePublishableKey` (internal parameter)
- `ANON_KEY` / `SUPABASE_ANON_KEY` → `PUBLISHABLE_KEY` / `SUPABASE_PUBLISHABLE_KEY` in examples, docs, and infra config
- `service_role` key references in doc comments → `secret` key
- Test variables `anonToken` → `publishableToken` in gotrue tests
JWT role claims (`'role': 'service_role'`) are left unchanged as they are
internal backend values unrelated to the key naming convention.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: deprecate anonKey instead of hard-removing it, revert ANON_KEY env var rename
- Keep anonKey as @deprecated in Supabase.initialize() so existing callers
continue to compile; they receive a deprecation warning pointing to publishableKey.
An assert enforces that at least one of the two is supplied.
- Revert ANON_KEY → PUBLISHABLE_KEY in docker-compose: the storage binary reads
ANON_KEY by name, renaming it silently breaks the service.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: apply dart format to changed files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor: rename publishableKey to supabaseKey in public API
The key passed to Supabase.initialize() can be either a publishable key
(anon) or a secret key depending on the use case, so the parameter name
should not imply a specific key type. Aligns with SupabaseClient which
already uses supabaseKey as its positional argument.
- Rename publishableKey parameter -> supabaseKey in Supabase.initialize()
- Update deprecated anonKey message to reference supabaseKey
- Update all call sites in tests, examples, docs, and CHANGELOG
- Revert internal gotrue test variable names back to anonToken (they
represent the anonymous JWT, unrelated to the public API rename)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: rename _init param supabasePublishableKey to supabaseKey, use SUPABASE_PUBLISHABLE_KEY in example
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* refactor: publishableKey for flutter package, supabaseKey for dart package; revert CHANGELOG edits
- Supabase.initialize() (supabase_flutter): rename supabaseKey → publishableKey.
Flutter apps are client-side and should always use the publishable (anon)
key, matching the label shown on the Supabase dashboard.
- SupabaseClient (supabase): keep supabaseKey as-is. The dart package is used
in both client and server contexts, so the generic name is appropriate.
- Add a note to SupabaseClient doc distinguishing publishable vs secret usage.
- Revert all CHANGELOG modifications — historical entries should not be
refactored.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments