How to generate JWT_SECRET?

Use your JWT_SECRET to generate a anon and service API keys using the JWT generator. (Mentioned in https://supabase.com/docs/guides/hosting/docker) Where can I generate this JWT secret?
404
404
Page not found
11 Replies
garyaustin
garyaustin3y ago
I think this still applies... https://github.com/supabase/supabase-js/issues/25#issuecomment-1019935888
secret is: your-super-secret-jwt-token-with-at-least-32-characters-long
GitHub
How to set/get the JWT secret? · Issue #25 · supabase/supabase-js
Question Is there a way to get or set the secret used to sign the JWT access tokens? My use case is to use the Supabase-generated tokens for authorization in other micro-services, so having the sec...
garyaustin
garyaustin3y ago
GitHub
supabase/.env.example at master · supabase/supabase
The open source Firebase alternative. Follow to stay updated about our public Beta. - supabase/.env.example at master · supabase/supabase
kingweb
kingwebOP3y ago
So for security I have to change super-secret-jwt-token-with-at-least-32-characters-long to a unique 32 length jwt? If yes where can I generate one? in jwt format
garyaustin
garyaustin3y ago
The secret is just a 32 character string, it is set by default to the string mentioned above.
kingweb
kingwebOP3y ago
super-secret-jwt-token-with-at-least-32-characters-long Is a not a valid jwt then how does it work correctly as the expecting value is a jwt?
garyaustin
garyaustin3y ago
If you are asking what the jwt should like (the claims): https://supabase.com/docs/learn/auth-deep-dive/jwts#jwts-in-supabase
Part One: JWTs
Part One: JWTs
Supabase Auth Deep Dive Part 1 - JWTs
garyaustin
garyaustin3y ago
There are anon and service_role jwt keys. They are encoded using the jwt secret string with an jwt encoder.
kingweb
kingwebOP3y ago
Can u provide me a sample value for JWT_SECRET other than super-secret-jwt-token-with-at-least-32-characters-long This will help me resolve my problem
garyaustin
garyaustin3y ago
It is just a string. It is not a jwt. So "abcdefghijklmnopqrstuvwxyz123456789" would work.
kingweb
kingwebOP3y ago
Thanks
garyaustin
garyaustin3y ago
I see the link actually goes to a jwt encoder now, so dropping what was here.

Did you find this page helpful?