mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-08-15 03:04:27 +08:00
Fix #335: implement after_reset_password handler
This commit is contained in:
@ -150,6 +150,7 @@ class FastAPIUsers:
|
||||
after_forgot_password: Optional[
|
||||
Callable[[models.UD, str, Request], None]
|
||||
] = None,
|
||||
after_reset_password: Optional[Callable[[models.UD, Request], None]] = None,
|
||||
) -> APIRouter:
|
||||
"""
|
||||
Return a reset password process router.
|
||||
@ -158,12 +159,15 @@ class FastAPIUsers:
|
||||
:param reset_password_token_lifetime_seconds: Lifetime of reset password token.
|
||||
:param after_forgot_password: Optional function called after a successful
|
||||
forgot password request.
|
||||
:param after_reset_password: Optional function called after a successful
|
||||
password reset.
|
||||
"""
|
||||
return get_reset_password_router(
|
||||
self.db,
|
||||
reset_password_token_secret,
|
||||
reset_password_token_lifetime_seconds,
|
||||
after_forgot_password,
|
||||
after_reset_password,
|
||||
)
|
||||
|
||||
def get_auth_router(
|
||||
|
Reference in New Issue
Block a user