Skip to content

Commit

Permalink
add more comments to clarify the change
Browse files Browse the repository at this point in the history
  • Loading branch information
imor committed Jan 6, 2025
1 parent 7182778 commit 80bd734
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion supabase/migrations/20250106073735_jwt_secret_from_vault.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
-- app.settings.jwt_secret has been removed, see https://github.com/orgs/supabase/discussions/30606
-- now we fetch the secret from vault
-- now we fetch the secret from vault. The redeem_access_token function is the same as before
-- (see file 20230906110845_access_token.sql) except the part where we fetch the jwt_secret.
create or replace function public.redeem_access_token(
access_token text
)
Expand Down Expand Up @@ -47,6 +48,7 @@ begin
issued_at := date_part('epoch', now);
expiry_at := date_part('epoch', one_hour_from_now);

-- read the jwt secret from vault
select decrypted_secret
into jwt_secret
from vault.decrypted_secrets
Expand Down

0 comments on commit 80bd734

Please sign in to comment.