Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions routers/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -1047,8 +1047,12 @@ def finish_migrate_password(state: str,
auth0_client: Annotated[Auth0Client, Depends(get_auth0_client)],
db_session: Annotated[Session, Depends(get_db_session)],):
"""
Complete the migration process. This should be called by Auth0 when a user
starts the actual password change, and clears their user_needs_migration flag.
Complete the migration process: clears the user_needs_migration flag and
sends the welcome email. Called by the Migrate User post-login Auth0
action, once a login shows the user's password has actually been reset
(event.user.last_password_reset is set) - not by the password-reset-post-challenge
flow, which fires as soon as the reset link is opened (e.g. by an email
security scanner), before any password has actually been changed.
"""
# Will raise if token is invalid
payload = verify_action_token(session_token, settings=settings)
Expand Down