supertokens / supertokens/supertokens-python
Flask does not save user context across API lifecycle
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 148
- Forks
- 48
- PR merge metrics
- No merged PRs in 30d
Description
In the middleware implementation for flask, we use @app.before_request, @app.after_request and @app.errorhandler(SuperTokensError) to manage supertokens hooks for each API call. However, a fresh new context is created across these preventing users from accessing the same user context across their overrides.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Flask middleware implementation and trace the @app.before_request, @app.after_request, and @app.errorhandler(SuperTokensError) hooks across one API call. Confirm that the same user context remains available to user overrides throughout the lifecycle, including error handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- flask, python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100