I have a Django app where there are 2 use cases where I want a user to be able to login without a password.

  1. User registers and gets activation link in e-mail.
  2. User resets password and gets link to change password form in e-mail.

The links include a one-time-use key that I validate, and then I want to log the user in without using credentials.

# This raises an exception unless
# I call user.authenticate 1st.
auth.login(request, user)

How do I acheive this?

Edit
Report