Welcome Guest, Not a member yet? Register   Sign In
One time passwords
#1

[eluser]Unknown[/eluser]
How do i use the library to generate OTPs? Please guide me from the scratch.. newbie!
#2

[eluser]SimonH[/eluser]
Hi,

I think asking everyone else to do the work for you is a bit much. One time password can be easily generated using the string helper and the encrypt library if you need to encrypt the generated password.

Step 1.
Setup a controller method to generate a password for you

Step 2.
inside said method use the random_string() function supplied by the string helper

Step 3.
encrypt the generated string or just save it to your database for later retrieval
#3

[eluser]SimonH[/eluser]
Btw,

it is advisable to setup up some sort of recursive function to check whether the generated password does not already exist before assigning it to a record. Sorry I forgot to mention it earlier.




Theme © iAndrew 2016 - Forum software by © MyBB