Skip to content

How to have multiple users hitting PostgREST #3066

Answered by laurenceisla
slloyd88 asked this question in Q&A
Discussion options

You must be logged in to vote

You don't need to have a JWT secret for each user. You can use the same secret and change the "role" inside the payload, that will generate a different JWT for that user and won't return the error you're getting.

The docs use jwt.io as example because it's an easy way to generate a JWT; in reality, you'd use an external service like Auth0 or you could manage it in the database as mentioned in this how-to. Later you could use Asymmetric Keys (again, handled by an external service) and implement more robustness for your JWT generation.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wolfgangwalther
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants