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
Replies: 1 comment
-
class UserManager(BaseUserManager):
...
async def func(password: str, user: User):
verified, _ = self.password_helper.verify_and_update(
password, user.hashed_password
) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
striker561
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using fastapi-userssqlalchemy and I've created a custom AuthenticationManager that extends BaseUserManager. I want to confirm a user's password before allowing them to update their email, delete their account, or perform other sensitive actions.
Is there a built-in method to validate a user's password against the hashed version stored in the database?
Beta Was this translation helpful? Give feedback.
All reactions