Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabaseβ€’6mo agoβ€’
2 replies
sheisty6

Python API: Migrating to JWT Signing Keys

Right now, my web client passes the logged in user's JWT to my Python backend, and my backend uses the JWT secret to decode the key. How can I migrate this to the new JWT Signing keys? I haven't seen any documentation about it.
decoded_payload = jwt.decode(
    token,
    ENV.supabase.jwt_secret,
    algorithms=["HS256"],
    audience="authenticated",
)
user_id = decoded_payload.get("user_metadata", {}).get(
    "sub"
) or decoded_payload.get("sub")
decoded_payload = jwt.decode(
    token,
    ENV.supabase.jwt_secret,
    algorithms=["HS256"],
    audience="authenticated",
)
user_id = decoded_payload.get("user_metadata", {}).get(
    "sub"
) or decoded_payload.get("sub")
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

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

JWT Signing Keys
SupabaseSSupabase / help-and-questions
7mo ago
Confused about Edge functions after migrating to JWT Signing Keys
SupabaseSSupabase / help-and-questions
7mo ago
supabase new jwt signing keys
SupabaseSSupabase / help-and-questions
7mo ago
JWT Signing Keys in Swift?
SupabaseSSupabase / help-and-questions
7mo ago