Temporary Login Code

Hello Wapplers :smile:

I would like to build a membership area but with a secure login process that do not want from a user to create a password, ever.

In both scenarios: while registering and creating a new account , the process is simple and the same:

  1. user types an email address and clicks a “email me a login code” button
  2. user receives an email with a temporary code and an activation link
  3. user types the code or clicks the link and is automatically logged in / or new account is created
  4. web browser doesn’t log out user until he does it by clicking “log out” button
  5. if user wants to log in again the process repeats from step 1

Can it be done in Wappler without custom code ?

Can Wappler generate a random 4 words to be used as code ?

Can Wappler create an activation link ?

What SMTP provider you recommend ?

Thanks :slight_smile:

of course you can …

do you need sent bulk mail ?

  1. For generating a temporary code - just when creating the user, create a hash for the user for example SHA512 - from TIMESTAMP + email and some custom long salt so it is unique to your service
  2. Store the hash code in the user table together with the user account
  3. Mail the link
  4. When clicked - check if the link exist - if it does login the user

As for SMTP you can use the local sendmail, but if you want something more reliable I would definitely advice Amazon SES. It can be used just as SMTP server from the Mailer component in Wappler.

3 Likes