php - Login on webapp by token sent by e-mail -


i building webapp supposed hosted in company servers , used through intranet. requirements are:

  1. the user accesses webapp.
  2. the app requests e-mail address.
  3. an e-mail containing unique link (token) sent address.
  4. the user clicks on link log in without password.

i developing webapp using symfony3 , thought of using friendsofsymfony user bundle. how can acheive that? fosuserbundle not mandatory.

the login functionalities want achieve not diver e.g. resetting password email. except temporary token in use case used authenticate user instead of authenticating password reset.

a simple explanation

you should create entity stores authentication token, e.g. autologin has user, token , timestamp property.

on submit of 'authentication form' new autologin record gets stored relationship towards user , user gets notified email.

whenever user clicks link should have method validates timestamp timeframe , authenticate user user provider.

examples

symfony 2: autologin


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -