How to have multiple jwt-secrets in a postgrest config file

53 views Asked by At

I am using PostgREST API on top of my postgresql database.

How do I have multiple jwt-secrets in the same config file? I have multiple users that need to authenticate to my API server.

1

There are 1 answers

0
Laurence Isla On

PostgREST only supports one JWT secret for a single instance.

I don't think you need a secret for each user though. For example, the answers in this SO discussion support this. One of the answers suggests using a "kid", which are used in JSON Web Key Sets and can be implemented in PostgREST with asymmetric keys.