Skip to content

Commit 6d18999

Browse files
fixing
1 parent 58bcbb6 commit 6d18999

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

fern/customization/jwt-authentication.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,11 @@ For example, it can be used to restrict which API endpoints the token can access
3939
// Define the payload
4040
const payload = {
4141
orgId: process.env.ORG_ID,
42-
};
43-
44-
const key = {
4542
tag: 'private',
4643
};
4744

45+
const key = process.env.PRIVATE_KEY;
46+
4847
// Define token options
4948
const options = {
5049
expiresIn: '1h',
@@ -60,9 +59,6 @@ const token = generateJWT(payload, key, options);
6059
// Define the payload
6160
const payload = {
6261
orgId: process.env.ORG_ID,
63-
};
64-
65-
const key = {
6662
tag: 'public',
6763
restrictions: {
6864
enabled: true,
@@ -72,6 +68,8 @@ const key = {
7268
},
7369
};
7470

71+
const key = process.env.PRIVATE_KEY;
72+
7573
// Define token options
7674
const options = {
7775
expiresIn: '1h',

0 commit comments

Comments
 (0)