Skip to content

Better sessions in oauth example #3299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JonathanWoollett-Light
Copy link

@JonathanWoollett-Light JonathanWoollett-Light commented Mar 31, 2025

Updates the oauth example to use a better approach to session management.

Motivation

The current approach to sessions within the oauth example is not fit for any circumstance, and if anyone where to take it at face value and use async_sessions their application would encounter severe performance issues. The current approach not only fails to lead users down the right path but actively leads them down the wrong path.

Solution

By updating the example to use a viable approach it helps people understand the right way to solve the problem, rather than potentially misleading them.

@JonathanWoollett-Light JonathanWoollett-Light force-pushed the oauth-sessions branch 3 times, most recently from 1b352f7 to 612f2e4 Compare March 31, 2025 19:03
@mladedav
Copy link
Collaborator

mladedav commented Apr 1, 2025

Would you mind expanding a bit on the motivation? Is the only issue performance?

@JonathanWoollett-Light
Copy link
Author

Would you mind expanding a bit on the motivation? Is the only issue performance?

The main motivation is that the current example while simpler doesn't really give an example of what someone needs to know.

Personally I used this example in testing, but recently discovered that this is not usable in production and thus needed to figure out what was usable. It would've saved me a lot of time if the example was usable to begin with.

I think we can save a lot of people time by simply making the example include what they will need rather than forcing them to look at this example, then realise it can't be used, then find a different example that can be used.

@JonathanWoollett-Light JonathanWoollett-Light force-pushed the oauth-sessions branch 3 times, most recently from 51e4fcb to 6a07a5b Compare May 22, 2025 05:55
Updates the oauth example to use a practical approach to session management.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants