File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -65,3 +65,19 @@ client.notify(
65
65
}
66
66
)
67
67
```
68
+
69
+ ### Signing JWTs
70
+
71
+ You can use the ` pyjwt ` package to [ sign JWTs easily] ( https://pyjwt.readthedocs.io/en/stable/usage.html#encoding-decoding-tokens-with-rs256-rsa ) .
72
+ You will need to generate an environment specific signing key, which you can find in the Knock dashboard.
73
+
74
+ If you're using a signing token you will need to pass this to your client to perform authentication.
75
+ You can read more about [ clientside authentication here] ( https://docs.knock.app/client-integration/authenticating-users ) .
76
+
77
+ ``` python
78
+ from jwt
79
+ import os
80
+
81
+ private_key = os.getenv(" KNOCK_SIGNING_KEY" )
82
+ encoded = jwt.encode({" sub" : " jhammond" }, private_key, algorithm = " RS256" )
83
+ ```
You can’t perform that action at this time.
0 commit comments