Adds supabase as the issuer for the JWT token

This commit is contained in:
Copple authored and Bobbie Soedirgo committed 2022-01-06 19:01:32 +08:00
1 parent 19383f9d7d
commit 68aca6cd61
2 files changed
+3

No files matched your search

+1
View File
@@ -122,6 +122,7 @@ If we put this token into https://jwt.io, we see it decodes to:
```js
{
"role": "anon",
"iss": "supabase",
"iat": 1614205174,
"exp": 1929781174
}
+2
View File
@@ -9,6 +9,7 @@ const fiveYears = new Date(now.getFullYear() + 5, now.getMonth(), now.getDate())
const anonToken = `
{
"role": "anon",
"iss": "supabase",
"iat": ${Math.floor(today / 1000)},
"exp": ${Math.floor(fiveYears / 1000)}
}
@@ -17,6 +18,7 @@ const anonToken = `
const serviceToken = `
{
"role": "service_role",
"iss": "supabase",
"iat": ${Math.floor(today / 1000)},
"exp": ${Math.floor(fiveYears / 1000)}
}