Skip to content

Conversation

brettchaldecott
Copy link

Description (required)

  • Add AsyncOAuth client for native async applications
  • Add SmartOAuth client for context-aware async/sync usage
  • Add standalone usage patterns for serverless/Lambda functions
  • Update all code examples with proper sync/async patterns
  • Add framework-specific implementation guides (Flask, FastAPI)
  • Restructure authentication flow documentation
  • Add migration recommendations and client selection guide
  • Update permissions, claims, and feature flags examples
  • Add Management API sync/async usage patterns
  • Improve error handling and best practices sections

Related issues & labels (optional)

  • Closes #
  • Suggested label:

…tion

- Add AsyncOAuth client for native async applications
- Add SmartOAuth client for context-aware async/sync usage
- Add standalone usage patterns for serverless/Lambda functions
- Update all code examples with proper sync/async patterns
- Add framework-specific implementation guides (Flask, FastAPI)
- Restructure authentication flow documentation
- Add migration recommendations and client selection guide
- Update permissions, claims, and feature flags examples
- Add Management API sync/async usage patterns
- Improve error handling and best practices sections

BREAKING: No breaking changes - maintains backward compatibility
@github-actions github-actions bot added the sdk label Sep 19, 2025
## Configure your app

The OAuth client is now automatically configured based on the framework you're using. Simply import the OAuth class from the auth module and create an instance:
The Kinde Python SDK provides three different OAuth client types to support various application patterns:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Says three but 5 are listed. Could we replace 'three' with 'several'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There three different libraries, 4 and 5 are examples of how to implement the 3 libraries.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am with @clairekinde11 here, it's not clear the distinction here.

4 and 5 should be updated to be examples, isn't the framework optional also?

</div>
```

### Automatic Route Registration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this a H2, so that the H4s that follow can be made into H3s. Please try to avoid H4


Here's how to use permissions in your application:

#### Flask (Synchronous)
Copy link
Contributor

@clairekinde11 clairekinde11 Sep 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this heading to ### Example: Flask (Synchronous), and follow for following H4s.

Remove lines 483 and 485


Here's how to use feature flags in your application:

#### Flask (Synchronous)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do same as previous section - H3 ### Example: Flask (Synchronous)
etc.


Here's how to use claims in your application:

#### Flask (Synchronous)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous, H3 ### Example: Flask (Synchronous)

Delete 771, 773

To use the Management API, you'll need to initialize the client with your Kinde credentials:
To use the Management API, you can initialize the client directly or through your OAuth client:

#### Direct initialization
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make these H3s - the small H3 intros and pushing the heading levels too far

Copy link
Contributor

@clairekinde11 clairekinde11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments about heading levels - would like to avoid H4s they are not as searchable, easy to scan, and do not show up in the context page menu.

…cture

- Promote main section headings from ### to ##
- Standardize subsection headings from #### to ###
- Improve document hierarchy and navigation consistency
- Enhance readability and accessibility of documentation structure
Copy link
Contributor

@clairekinde11 clairekinde11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay from copy and structure perspective - awaiting tech review

## Configure your app

The OAuth client is now automatically configured based on the framework you're using. Simply import the OAuth class from the auth module and create an instance:
The Kinde Python SDK provides three different OAuth client types to support various application patterns:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am with @clairekinde11 here, it's not clear the distinction here.

4 and 5 should be updated to be examples, isn't the framework optional also?

Comment on lines +1195 to +1216
## Important Notes

### Async/Sync Consistency
The SDK now provides consistent async and sync APIs to address previous inconsistencies:
- **Auth modules** (permissions, claims, feature_flags) are async and work with all client types
- **OAuth methods** are now properly separated into sync and async versions
- **SmartOAuth** provides a unified interface that adapts to the execution context

### Backward Compatibility
All existing code continues to work without changes:
- The original `OAuth` class remains unchanged
- Existing sync methods remain sync
- Existing async methods remain async
- No breaking changes to the public API

### Migration Recommendations
- **New Flask projects**: Use `OAuth` for simplicity
- **New FastAPI projects**: Use `AsyncOAuth` for best performance
- **Mixed projects**: Use `SmartOAuth` for flexibility
- **Serverless/Lambda**: Use `AsyncOAuth` with `framework=None`
- **Existing projects**: No changes required, but consider migrating for better consistency

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like summary of changes should it be removed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants