Skip to content

Commit 10f6422

Browse files
committed
Make JWT clearer
1 parent 46fccfe commit 10f6422

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/postgraphileOptions.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
exports.options = {
22
dynamicJson: true,
33
cors: true,
4-
jwtSecret: process.env.JWT_SECRET || String(Math.random()),
54
graphiql: false,
65
externalUrlBase: '/default',
76

7+
// If consuming JWT:
8+
jwtSecret: process.env.JWT_SECRET || String(Math.random()),
9+
// If generating JWT:
10+
jwtPgTypeIdentifier: 'forum_example.jwt_token',
11+
812
/* If you want to enable GraphiQL, you must use `externalUrlBase` so PostGraphile
913
* knows where to tell the browser to find the assets. Doing this is
1014
* strongly discouraged, you should use an external GraphQL client instead.

0 commit comments

Comments
 (0)