supabase-on-aws icon indicating copy to clipboard operation
supabase-on-aws copied to clipboard

How to update JWT secrets/tokens?

Open mattrigg9 opened this issue 1 year ago • 1 comments
trafficstars

Improve documentation

Describe the problem

I've been struggling to figure out how to rotate the anon and service API tokens. I see that there's a JWTSecret in Secrets Manager that the JsonWebTokenFunction lambda pulls from to generate the JWTs. And I can see that Supabase validates the JWTs using this same secret. If I wanted to change this JWTSecret value (either manually or programmatically), how can I force the JsonWebTokenFunction lambda to run again and regenerate the JWT tokens? Updating the stack doesn't seem to make the lambda run again. Thanks!

Describe the improvement

A clear and concise description of the improvement.

Additional context

Add any other context or screenshots that help clarify your question.

mattrigg9 avatar Dec 16 '23 20:12 mattrigg9

@mats16 any thoughts here?

mattrigg9 avatar Jan 04 '24 14:01 mattrigg9