We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://supabase.com/docs/guides/self-hosting/docker
anonKey and serviceKey in secrets can be documented better for iss part
secret: jwt: # JWT keys and secrets anonKey: "xxx serviceKey: "xxx" secret: "xxx"
pip install pyjwt then run the script to generate the anonKey and serviceKey
pip install pyjwt
import jwt import time jwt_secret = "my_jwt_secret" anon_claims = { "role": "anon", "iss": "supabase.supabase-auth.svc.cluster.local", "iat": int(time.time()), "exp": int(time.time() + 43200) # 12 hours } service_claims = { "role": "service_role", "iss": "supabase.supabase-supabase-auth.svc.cluster.local", "iat": int(time.time()), "exp": int(time.time() + 43200) # 12 hours } anon_token = jwt.encode(anon_claims, jwt_secret, algorithm="HS256") service_token = jwt.encode(service_claims, jwt_secret, algorithm="HS256") print("ANON_KEY:", anon_token) print("SERVICE_KEY:", service_token)
or golang
package main import ( "fmt" "time" jwt "github.com/dgrijalva/jwt-go" ) func main() { secreto := "your-secret-key" claims := jwt.MapClaims{ "role": "anon", "iss": "supabase.supabase-auth.svc.cluster.local", "iat": time.Now().Unix(), "exp": time.Now().Add(12 * time.Hour).Unix(), } token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims) signedToken, _ := token.SignedString([]byte(secreto)) fmt.Println(signedToken) }
I was confused about the iss part
The text was updated successfully, but these errors were encountered:
closing this for kubernetes repo
Sorry, something went wrong.
No branches or pull requests
Improve documentation
Link
https://supabase.com/docs/guides/self-hosting/docker
Describe the problem
anonKey and serviceKey in secrets can be documented better for iss part
Describe the improvement
pip install pyjwt
then run the script to generate the anonKey and serviceKeyor golang
Additional context
I was confused about the iss part
The text was updated successfully, but these errors were encountered: