php - Login on webapp by token sent by e-mail -
i building webapp supposed hosted in company servers , used through intranet. requirements are:
- the user accesses webapp.
- the app requests e-mail address.
- an e-mail containing unique link (token) sent address.
- 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
Post a Comment