Any way to redirect on JWSError JWSInvalidSignature? #3808
-
My web app uses PostgreSQL to create the JWT tokens processed by PostgREST. I deliver the application entirely via It would suffice to have a way to tell PostgREST to proceed with the request as the anonymous user, but I don't see how to accomplish this. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
There is no way to accomplish what you're asking for.
Did you consider setting up some error handler on the client for all requests, which catches the JWSInvalidSignature error and triggers the re-authentication? |
Beta Was this translation helpful? Give feedback.
-
@TreyBoudreau checkout https://github.com/edgeflare/pgo. It's not yet as robust and reliable (please do give your feedback to make it so) as PostgREST, but enhances postgrest in a few ways:
rest:
listenAddr: ":8080"
pg:
connString: "host=localhost port=5432 user=postgrest password=secret dbname=testdb"
oidc:
issuer: https://iam.example.org
clientID: example-client-id
clientSecret: example-client-secret
roleClaimKey: .policies.pgrole
basicAuth:
admin: adminpw
user1: user1pw
anonRole: anon |
Beta Was this translation helpful? Give feedback.
There is no way to accomplish what you're asking for.
Did you consider setting up some error handler on the client for all requests, which catches the JWSInvalidSignature error and triggers the re-authentication?