Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Adds supabase as the issuer for the JWT token

Copple68aca6cd61f1
diff --git a/web/docs/learn/auth-deep-dive/jwts.md b/web/docs/learn/auth-deep-dive/jwts.md
index 228c0418e9d..ae2453ff03b 100644
--- a/web/docs/learn/auth-deep-dive/jwts.md
+++ b/web/docs/learn/auth-deep-dive/jwts.md
@@ -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
}
diff --git a/web/src/components/JwtGenerator.js b/web/src/components/JwtGenerator.js
index 88aafbc930d..aa768cb3374 100644
--- a/web/src/components/JwtGenerator.js
+++ b/web/src/components/JwtGenerator.js
@@ -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)}
}