You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a missing information in docs in what format should be the JWT secret in GOTRUE_JWT_SECRET environment variable. In README.md there is an information that:
The secret used to sign JWT tokens with.
This is not always true. Given value is not always used to sign the token. It can be sometimes decoded from base64, if the secret is a valid base64 string before signing the token.
Let's use the JWT website to verify the secret value.
If the aaaa string is used then signature is not verified. But the token can be successfully verified if the secret base64 encoded option is checked.
Describe the improvement
At least there should be an annotation in documentation that GOTRUE_JWT_SECRET should always be passed as the base64 encoded string. Without that information the behaviour of software is unpredictable. It can be confusing for the user that tried to sign the token using aaaa value, but in fact the aaaa was transformed to i and i was used to sign the token.
Additional context
N/A
The text was updated successfully, but these errors were encountered:
Improve documentation
Link
README.md
Describe the problem
Overview
There is a missing information in docs in what format should be the JWT secret in
GOTRUE_JWT_SECRET
environment variable. InREADME.md
there is an information that:This is not always true. Given value is not always used to sign the token. It can be sometimes decoded from base64, if the secret is a valid base64 string before signing the token.
Let's use the JWT website to verify the secret value.
Prerequisites
Sharing the
compose.yaml
for easier reproduction:And the database
01-init.sql
script:Verification
Take into account two scenarios:
Create anonymous user to get the JWT
access_token
.Scenario 1
If the
secret
is used then signature is verified.Scenario 2
If the
aaaa
string is used then signature is not verified. But the token can be successfully verified if thesecret base64 encoded
option is checked.Describe the improvement
At least there should be an annotation in documentation that
GOTRUE_JWT_SECRET
should always be passed as the base64 encoded string. Without that information the behaviour of software is unpredictable. It can be confusing for the user that tried to sign the token usingaaaa
value, but in fact theaaaa
was transformed toi
andi
was used to sign the token.Additional context
N/A
The text was updated successfully, but these errors were encountered: