Skip to content

Supabase - Auth0 custom role claim #1770

@junaidrasheed

Description

@junaidrasheed

Describe the bug

Hi guys, I am trying to integrated Auth0 as third-party auth provider. I followed all the steps provided in the docs. However I am not getting the custom role claim from the token when I inspect is using https://jwt.io.

Some background for my setup. I am building a Nuxt + Supabase application, where supabase will be interacted with mostly in server side.

Here is the code snippet for Supabase Client.

return createClient<T>(
    process.env.SUPABASE_URL ?? '',
    process.env.SUPABASE_KEY ?? '',
    {
      accessToken: async () => {
        return authHeader; //passing this from nitro header
      },
    }
Image Image

Library affected

supabase-js

Reproduction

No response

Steps to reproduce

No response

System Info

System:
    OS: macOS 15.6.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 494.36 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.13.1 - /Users/junaidrasheed/.nvm/versions/node/v22.13.1/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.9.2 - /Users/junaidrasheed/.nvm/versions/node/v22.13.1/bin/npm
    bun: 1.2.1 - /Users/junaidrasheed/.bun/bin/bun
    Deno: 2.5.2 - /Users/junaidrasheed/.deno/bin/deno
  Browsers:
    Brave Browser: 141.1.83.112
    Chrome: 139.0.7258.155
    Firefox: 111.0
    Safari: 18.6
  npmPackages:
    @supabase/supabase-js: ^2.75.0 => 2.75.0 
    supabase: ^2.33.9 => 2.48.3

Used Package Manager

npm

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrepro neededIssue is missing a reproduction example.supabase-jsRelated to the supabase-js library.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions