Is it secure to log in a user without a password?

Question:

I am thinking of logging a user in to my Django website by verifying the email rather than them having to write a password.

If this is not clear, this is what I’m thinking:

  1. User enters email
  2. User gets a email containing a code
  3. User enters code in website
  4. User is logged in

Is this safe to do without hackers accessing the accounts of other users?

Asked By: Bob The Builder

||

Answers:

It is safe only if you don’t have any leaks in your code. Such as this website: https://pushkarthegr.github.io/Elektronik/signin.html
Here, if you go into console and type code the OTP is quite notable.

Answered By: The Myth

As far as I understand your problem you want to generate tokens for users that would serve as an authentication method to access your service.

I don’t know how secure that is because you have to take into consideration a lot of different things like length of the token (password) and method you use to generate it. Also some kind of a token rotation should be incluced.

Instead of this you can use more popular approach to this problem that is either

With that users can log into your website without typing password every time they want to access it.

Answered By: mlokos
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.