Skip to content

Commit 9a5d266

Browse files
authored
Update jwk-verification.md (#343)
1 parent 58bde30 commit 9a5d266

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pages/postgraphile/jwk-verification.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This guide uses the [`express`](https://www.npmjs.com/package/express) HTTP
2121
framework and supporting Node packages authored and maintained by Auth0:
2222

2323
- [`express-jwt`](https://github.com/auth0/express-jwt) - _Middleware that
24-
validates a JWT and copies its contents to `req.user`_
24+
validates a JWT and copies its contents to `req.auth`_
2525
- [`jwks-rsa`](https://github.com/auth0/node-jwks-rsa) - _A library to retrieve
2626
RSA public keys from a JWKS (JSON Web Key Set) endpoint_
2727

@@ -144,8 +144,8 @@ app.use(
144144
postgraphile(process.env.DATABASE_URL, process.env.DB_SCHEMA, {
145145
pgSettings: req => {
146146
const settings = {};
147-
if (req.user) {
148-
settings["user.permissions"] = req.user.scopes;
147+
if (req.auth) {
148+
settings["user.permissions"] = req.auth.scopes;
149149
}
150150
return settings;
151151
},

0 commit comments

Comments
 (0)