© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4mo ago•
17 replies
Amal Chandran

Help with custom JWT

Hi team,

I'm working on integrating custom third-party JWTs following this guide:
https://supabase.com/docs/guides/auth/jwts#using-custom-or-third-party-jwts
https://supabase.com/docs/guides/auth/jwts#using-custom-or-third-party-jwts


I'm running into an error when trying to start my local Supabase instance after configuring the
signing_keys_path
signing_keys_path
.

Steps I've taken:


1. Generated a new signing key:
    npx supabase gen signing-key --algorithm ES256
    npx supabase gen signing-key --algorithm ES256

2. Saved the output (a single JSON object) to
signing_key.json
signing_key.json
.
3. Stopped the local server:
    npx supabase stop --no-backup
    npx supabase stop --no-backup

4. Updated my
config.toml
config.toml
to include the new key:
    [auth]
    signing_keys_path = "./signing_key.json"
    [auth]
    signing_keys_path = "./signing_key.json"

5. Tried to start the server again:
    npx supabase start
    npx supabase start


The Error


When I run
npx supabase start
npx supabase start
, it fails with this error:

failed to decode signing keys: failed to parse response body: json: cannot unmarshal object into Go value of type []config.JWK
Try rerunning the command with --debug to troubleshoot the error.
failed to decode signing keys: failed to parse response body: json: cannot unmarshal object into Go value of type []config.JWK
Try rerunning the command with --debug to troubleshoot the error.


If I comment out the
signing_keys_path
signing_keys_path
line in
config.toml
config.toml
and start again, the server starts perfectly fine.

My Question


The error
cannot unmarshal object into Go value of type []config.JWK
cannot unmarshal object into Go value of type []config.JWK
suggests that Supabase is expecting a JSON array of keys (a
[]JWK
[]JWK
), but the
gen signing-key
gen signing-key
command outputs a single JSON object.

My
signing_key.json
signing_key.json
currently looks like this (a single object):

{
  "kty": "EC",
  "crv": "P-256",
  "x": "...",
  "y": "...",
  "d": "..."
}
{
  "kty": "EC",
  "crv": "P-256",
  "x": "...",
  "y": "...",
  "d": "..."
}


Thanks in advance for any help!
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Custom JWT
SupabaseSSupabase / help-and-questions
7mo ago
Login with wallet, custom JWT
SupabaseSSupabase / help-and-questions
4y ago
Realtime not working with Custom Jwt with RLS
SupabaseSSupabase / help-and-questions
3mo ago
RLS based on custom jwt
SupabaseSSupabase / help-and-questions
4y ago