Skip to content

Add dynamic auth token updates #3

@zoedsoupe

Description

@zoedsoupe

Problem

JS has setAuth(token) to update tokens without recreating client. Elixir requires new client instance.

Proposed Solution

# Option 1: Functional update
client = Supabase.Functions.update_auth(client, "new_token")

# Option 2: Per-request override
Supabase.Functions.invoke(client, "fn", auth: "new_token")

Benefits

  • Token rotation support
  • Better performance
  • Feature parity with JS

JS Reference: functions-js/src/FunctionsClient.ts:56-62

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions