Skip to content

Commit 58d1121

Browse files
feat(functions): exposing JWKs as non internal env (#4985)
stamp: passing down jwks as non internal env
1 parent 6aecf76 commit 58d1121

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

internal/functions/serve/serve.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func ServeFunctions(ctx context.Context, envFilePath string, noVerifyJWT *bool,
133133
"SUPABASE_SERVICE_ROLE_KEY="+utils.Config.Auth.ServiceRoleKey.Value,
134134
"SUPABASE_DB_URL="+dbUrl,
135135
"SUPABASE_INTERNAL_JWT_SECRET="+utils.Config.Auth.JwtSecret.Value,
136-
"SUPABASE_INTERNAL_JWKS="+jwks,
136+
"SUPABASE_JWKS="+jwks,
137137
fmt.Sprintf("SUPABASE_INTERNAL_HOST_PORT=%d", utils.Config.Api.Port),
138138
)
139139
if viper.GetBool("DEBUG") {

internal/functions/serve/templates/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ async function isValidLegacyJWT(jwtSecret: string, jwt: string): Promise<boolean
122122
let jwks = (() => {
123123
try {
124124
// using injected JWKS from cli
125-
return jose.createLocalJWKSet(JSON.parse(Deno.env.get('SUPABASE_INTERNAL_JWKS')));
125+
return jose.createLocalJWKSet(JSON.parse(Deno.env.get('SUPABASE_JWKS')));
126126
} catch (error) {
127127
return null
128128
}

0 commit comments

Comments
 (0)