Skip to content

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.

1 participant