🐛 Bug Report - _access_token
cache leads to wrong user being logged in
#47
Labels
bug
Something isn't working
Bug description
First off, thanks for the great project! We are trying to see if we can use this as part of our FastAPI application, but found a major bug in the implementation:
TLDR
Storing the
OAuth2Core._access_token
means the 2nd person to login to the server (and each subsequent user) gets the 1st person'suser_data
in their token.core.py
fastapi-oauth2/src/fastapi_oauth2/core.py
Lines 72 to 76 in 53973d6
Solution
Returning the
access_token
directly from the_oauth_client
works correctly, as far as I can tell.Reproduction URL
WGBH-MLA/organ#3
Reproduction steps
Server
Env
Steps
Homepage URL
: http://localhost:8000/Authorization callback URL
: http://localhost:8000/oauth2/github/tokenuvicorn server:app
Authorization
cookieAuthorization
cookie with Browser 1'suser_data
Screenshots
Logs
No response
Browsers
No response
OS
No response
The text was updated successfully, but these errors were encountered: