-
-
Notifications
You must be signed in to change notification settings - Fork 611
Closed
Description
I'm using Auth0 and secrets for JWT middleware in their example code is fetched through jwks. This isn't possible with current postgraphql API, even v4 as it only accepts secrets supplied as strings, not callback function.
Specifically I would like jwtSecret property to accept something like
import * as jwks from 'jwks-rsa';
...
app.use(postgraphql(connectionString, 'public', {
...
jwtAudiences: ['custom.audience.id'],
jwtSecret: jwks.expressJwtSecret({
cache: true,
rateLimit: true,
jwksRequestsPerMinute: 5,
jwksUri
})
graphiql: true,
...
}));I see that it will probably be relatively simple to refine code at https://github.com/postgraphql/postgraphql/blob/5979eafcb2fe4c675870b265aeca8ff68d7d053e/src/postgraphql/withPostGraphQLContext.ts#L125-L130 but would it require more changes for PgJWTPlugin as well for everything to work?
Metadata
Metadata
Assignees
Labels
No labels