|
Lee Mansfield - 2012-10-26 16:48:54
Hi, I've been playing around trying to implement this rather impressive class but I seem to have issues trying to get a locked user back.
I've created one using the following code:-
-create lucy mOTP 6881acfc78b7dac16c5fc70302fc66a1 1234 6
Then I can login fine, I get the OK response back. Then I purposely fail each and every login until I get the 'user locked' response.
I then attempt to run:-
-log -resync -status lucy eb7622 c587b0
And it just continually fails with the error 'Resync for user lucy has failed'
I'm using the iOTP app on my iPhone to generate the tokens you see here, and have tried to enter them sequentially but no joy. Incidentally the tokens generated by the same app work fine when attempting a login.
Any pointers would be most helpful.
Thanks
André Liechti - 2013-06-14 17:04:22 - In reply to message 1 from Lee Mansfield
Hello,
Is this issue fixed with the last version (see beta version available on www.multiotp.net, on the left side).
Regards,
André
Lee Mansfield - 2013-07-09 12:28:37 - In reply to message 2 from André Liechti
Hi, I'm now having issues with continual failures so I thought I would start from fresh. I'm currently running version 3.9.2.
I create a user like so:-
$multiotp->EnableVerboseLog(); // Could be helpful at the beginning
$multiotp->SetUser("joe_b");
$multiotp->SetUserPrefixPin(1);
$multiotp->SetUserAlgorithm("mOTP");
multiotp->SetUserTokenSeed("6881acfc78b7dac16c5fc70302fc66a1");
$multiotp->SetUserPin("1234");
$multiotp->SetUserTokenNumberOfDigits(6);
$multiotp->SetUserTokenTimeInterval(30);
$multiotp->WriteUserData();
Then I use the iPhone app, iOTP and create an account using the long token seed entered above as the 'secret'.
Using the generated 6 digit code from the app, the following code always fails:-
$multiotp->EnableVerboseLog(); // Could be helpful at the beginning
$multiotp->SetUser("joe_b");
if(0 == $multiotp->CheckToken("".$_POST["xMOTPPassword"]."")){
echo "Authentication ACCEPTED.";
}else{
echo "Authentication REJECTED.";
}
The above always says 'Authentication REJECTED'. The $_POST["xMOTPPassword"] contains the 6 digit code rendered from the iOTP app.
Are there any pointers here? Am I configuring the user wrong at the start or some other setting I'm missing?
Regards
André Liechti - 2013-07-09 17:51:13 - In reply to message 3 from Lee Mansfield
Hello,
But typing $multiotp->SetUserPrefixPin(1); you set the user with the option for a prefix PIN, which is not needed with mOTP because you already need the PIN to generate the token.
With the configuration you did, you have to type the prefix pin + the token (in this case 1234 + the token).
Just do that $multiotp->SetUserPrefixPin(0) when you create the user, and you will be successful ;-)
In the mean tie, you can also have a look at the last beta version, available on http://www.multiotp.net/, see on the left side, you can download the last beta.
A lot of new functionalities, really ;-)
Generate QRcode for Google Authenticatort and compatbiel software tokens, etc.
Regards,
Andre
Lee Mansfield - 2013-07-10 10:21:05 - In reply to message 4 from André Liechti
Hi, I just changed to line from
$multiotp->SetUserPrefixPin(1);
to
$multiotp->SetUserPrefixPin(0);
and I still cannot get the login to function correctly. I've flushed all users and although it creates them fine, the token check always appears to fail. I've used 3.9.2 and 4.0.3beta9 and it still fails.
========================================
multiotp 3.9.2
2013-07-09 19:12:11 Error: authentication failed for user joe_b
2013-07-09 19:12:11 (authentication typed by the user: e4ce0b)
========================================
multiotp 4.0.3beta9
2013-07-10 11:02:57 Error: authentication failed for user joe_b
2013-07-10 11:02:57 (authentication typed by the user: 5680bc)
I've also checked that my server and the 'OTP Time' are in sync and it appears it is.
I'm running MAMP 2.1.1 and PHP 5.4.4
Regards
André Liechti - 2013-07-10 10:29:50 - In reply to message 5 from Lee Mansfield
Hello,
Send me your whole PHP file(s) and all related files (users file, config file) in on .ZIP, I will have a look on it.
Contact email is in the header of the source of the class.
Regards,
Andre
Lee Mansfield - 2013-07-10 11:21:48 - In reply to message 6 from André Liechti
Hi Andre, I attempted to send the files to the e-mail address I could find in the code but the response was a failure to send mail to the server.
You can download the package from here:-
comunicata.com/mOTP-test.zip
André Liechti - 2013-07-10 14:53:52 - In reply to message 7 from Lee Mansfield
Done, I keep you in touch by email.
I will post the resolution for other users when finished.
Regards.
Andre
André Liechti - 2013-07-10 17:01:52 - In reply to message 7 from Lee Mansfield
Hello,
When you are using a default mOTP client, the default time interval is 10 seconds.
Yo will have to set it accordingly: $multiotp->SetUserTokenTimeInterval(10);
Best regards,
Andre
|