You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Secure token generation for [IntegrationOS AuthKit](https://docs.integrationos.com/docs/authkit)
4
-
using [PyPI](https://pypi.org/).
3
+
Secure token generation for [IntegrationOS AuthKit](https://docs.integrationos.com/docs/authkit) using [PyPI](https://pypi.org/).
5
4
6
5
## Installation
7
6
@@ -18,29 +17,23 @@ Here's a quick example of how to use the SDK:
18
17
```python
19
18
from integrationos import AuthKit
20
19
21
-
# Initialize the AuthKit with your secret
22
-
auth_kit = AuthKit("your_secret_here")
20
+
@app.route('/authkit-token', methods=['POST'])
21
+
defcreate_authkit_token():
22
+
payload = {
23
+
"group": "meaningful-id", # a meaningful identifier (i.e., organizationId)
24
+
"label": "Friendly Label", # a human-friendly label (i.e., organizationName)
25
+
}
23
26
24
-
# Create an embed token
25
-
payload = {
26
-
"group": "your_group",
27
-
"label": "your_label",
28
-
# Add other required parameters
29
-
}
27
+
embed_token = AuthKit("sk_live_12345")
28
+
response = embed_token.create(payload)
30
29
31
-
result = auth_kit.create(payload)
32
-
print(result)
30
+
return response
33
31
```
34
32
35
-
You'll want to switch out the API Key for your own, which will later tell your frontend which integrations you'd like to
36
-
make available to your users.
33
+
You'll want to switch out the API Key for your own, which will later tell your frontend which integrations you'd like to make available to your users.
37
34
38
-
You'll also want to populate the `Group` and `Label` fields depending on how you want to organize and query your users'
39
-
connected accounts. The Group is especially important as it's used to generate the
40
-
unique [Connection Key](https://docs.integrationos.com/docs/setup) for the user once they successfully connect an
41
-
account.
35
+
You'll also want to populate the `Group` and `Label` fields depending on how you want to organize and query your users' connected accounts. The Group is especially important as it's used to generate the unique [Connection Key](https://docs.integrationos.com/docs/setup) for the user once they successfully connect an account.
42
36
43
37
## Full Documentation
44
38
45
-
Please refer to the official [IntegrationOS AuthKit](https://docs.integrationos.com/docs/authkit) docs for a more
46
-
holistic understanding of IntegrationOS AuthKit.
39
+
Please refer to the official [IntegrationOS AuthKit](https://docs.integrationos.com/docs/authkit) docs for a more holistic understanding of IntegrationOS AuthKit.
0 commit comments