Skip to content

How to avoid creating multiple sessions when using Dependencies with Security? #555

Answered by DurandA
DurandA asked this question in Questions
Discussion options

You must be logged in to vote

The original code was oversimplified. The issue is introduced when there is both a Security object and a Depends that use get_session(). It looks more like a FastAPI bug with Security behavior than a SQLModel issue. Consequently I created a FastAPI discussion and mark this discussion as solved.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@DurandA
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by DurandA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
2 participants