Skip to content
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

Refactored get_by_oauth_account on manager.py #1348

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

Conversation

camiloavil
Copy link

to handle missing of OuthAccount on BaseUserDatabase

I went through it not once, but twice. When implementing fastapiusers with OAuth, I forgot to add the 'OAuthAccount' class to the definition of 'BeanieUserDatabase(User, OAuthAccount)' or 'SQLAlchemyUserDatabase(session, User, OAuthAccount)' on db.py example file.

When that happens, the API works fine until the OAuth2 flow is initiated, and the error occurs without knowing exactly where. Perhaps this is a good way to catch the error and save hours of searching and digging into the code to solve the issue.

PS: Enjoy digging into the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant