Skip to content

How do I securely verify a user's password before making sensitive changes (e.g., email update, addresses) using fastapi-users? #1525

Answered by hgalytoby
striker561 asked this question in Q&A
Discussion options

You must be logged in to vote
class UserManager(BaseUserManager):
    ...

    async def func(password: str, user: User):
        verified, _ = self.password_helper.verify_and_update(
            password, user.hashed_password
        )

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by striker561
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants