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
Copy file name to clipboardExpand all lines: src/content/docs/developer-tools/sdks/backend/python-sdk.mdx
+26-24Lines changed: 26 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,9 @@ The Kinde Python SDK allows developers to quickly and securely integrate a new o
17
17
- Kinde Python SDK supports Python 3.9+
18
18
- If you haven't already got a Kinde account, [register for free here](https://app.kinde.com/register) (no credit card required). Registering gives you a Kinde domain, which you need to get started, e.g. `yourapp.kinde.com`.
19
19
20
-
For new projects, you can also find our [Starter Kit on GitHub](https://github.com/kinde-starter-kits/python-starter-kit).
20
+
If you are using a previous version of Python, you may need to refer to the [previous v1 SDK](/developer-tools/sdks/backend/python-sdk-v1/).
21
+
22
+
For new projects, you can find our [Starter Kit on GitHub](https://github.com/kinde-starter-kits/python-starter-kit).
21
23
22
24
## Install
23
25
@@ -27,19 +29,19 @@ Install [PIP](https://pip.pypa.io/en/stable/installation/) and then execute the
27
29
pip install kinde-python-sdk
28
30
```
29
31
30
-
### Environment Variables
32
+
### Environment variables
31
33
32
-
The Kinde Python SDK v2 uses environment variables for configuration. Here are all the supported variables:
34
+
The Kinde Python SDK uses environment variables for configuration. Here are all the supported variables:
33
35
34
-
#### Required Variables
36
+
#### Required variables
35
37
-`KINDE_CLIENT_ID` - Your application's client ID from Kinde
36
38
-`KINDE_CLIENT_SECRET` - Your application's client secret from Kinde
37
39
-`KINDE_REDIRECT_URI` - The callback URL where Kinde will redirect after authentication
38
40
-`KINDE_HOST` - Your Kinde domain (e.g., `https://yourdomain.kinde.com`)
39
41
-`KINDE_ISSUER_URL` - Your Kinde issuer URL (typically same as KINDE_HOST)
40
42
-`GRANT_TYPE` - The OAuth grant type to use (e.g., `AUTHORIZATION_CODE_WITH_PKCE`)
41
43
42
-
#### Optional Variables
44
+
#### Optional variables
43
45
-`KINDE_AUDIENCE` - The intended recipient of the access token (for API access)
44
46
-`KINDE_CALLBACK_URL` - Alternative name for KINDE_REDIRECT_URI
45
47
-`LOGOUT_REDIRECT_URL` - Where users are redirected after logout
@@ -149,7 +151,7 @@ oauth = OAuth(
149
151
)
150
152
```
151
153
152
-
### Manual Route Implementation
154
+
### Manual route implementation
153
155
154
156
If you prefer to implement the routes manually, here's how you can do it:
155
157
@@ -277,7 +279,7 @@ The Kinde Python SDK provides a simple way to check user permissions in your app
277
279
from kinde_sdk.auth import permissions
278
280
```
279
281
280
-
### Checking Permissions
282
+
### Checking permissions
281
283
282
284
To check if a user has a specific permission:
283
285
@@ -298,7 +300,7 @@ print(f"User belongs to organization: {all_permissions['orgCode']}")
Here are some common claims you might want to access:
521
523
@@ -538,7 +540,7 @@ Here are some common claims you might want to access:
538
540
"org_id"
539
541
```
540
542
541
-
### Token Types
543
+
### Token types
542
544
543
545
The SDK supports two types of tokens:
544
546
@@ -632,7 +634,7 @@ Once the user has successfully authenticated, you'll get a JWT and possibly a re
632
634
633
635
The Kinde Python SDK provides a Management API client for interacting with Kinde's management endpoints. This allows you to programmatically manage users, organizations, and other resources.
634
636
635
-
### Getting Started
637
+
### Getting started
636
638
637
639
To use the Management API, you'll need to initialize the client with your Kinde credentials:
638
640
@@ -648,7 +650,7 @@ oauth = OAuth(
648
650
management = oauth.get_management()
649
651
```
650
652
651
-
### Available Endpoints
653
+
### Available endpoints
652
654
653
655
The Management API provides methods for common operations on resources. Here are some examples:
0 commit comments