Skip to content

feat(supabase): add storage_key to AuthClientOptions - #2014

Closed
spydon wants to merge 1 commit into
lukasklingsbo/sdk-2727-auth-persist_session-and-storage_keyfrom
lukasklingsbo/sdk-2727-auth-options-storage-key
Closed

spydon wants to merge 1 commit into
lukasklingsbo/sdk-2727-auth-persist_session-and-storage_keyfrom
lukasklingsbo/sdk-2727-auth-options-storage-key

Conversation

@spydon

@spydon spydon commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Stacked on #2013, which makes the auth client constructors use storage_key.

What

The supabase client had no way to set the key the auth session is stored under. Two supabase clients sharing one session_storage, for example clients for two projects, wrote their sessions to the same supabase.auth.token key and overwrote each other.

Changes

  • AuthClientOptions gains storage_key, defaulting to "supabase.auth.token", the key used until now.
  • AsyncClient and Client pass it to the auth client.
  • sdk-compliance.yaml: the client.session_management.persist_session note mentions storage_key on AuthClientOptions.
  • Tests check that a custom storage_key reaches the session manager and that the default is unchanged.
client = create_client(
    url,
    key,
    auth=AuthClientOptions(session_storage=shared_storage, storage_key="project-a"),
)

Related to SDK-2727.

@coderabbitai

coderabbitai Bot commented Nov 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review: 1

  • develop

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b69d709b-ade9-44ed-bc93-bc8582668adc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@spydon spydon closed this Nov 9, 2026
@spydon
spydon deleted the lukasklingsbo/sdk-2727-auth-options-storage-key branch November 9, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant