11-20-2017, 09:17 PM
/api/?action=verify2FA&twoCode=blabla
The following warnings occurred: | ||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
2-Factor Authentication (2FA - Done)
|
11-20-2017, 09:17 PM
/api/?action=verify2FA&twoCode=blabla
11-20-2017, 09:18 PM
It says it's been validated, also states it within dev tools http://prntscr.com/hd2odk
11-20-2017, 09:23 PM
you sent it blabla or the code from your phone?
11-20-2017, 09:27 PM
you got it working?
11-20-2017, 09:32 PM
Code updated again. I added an if statement to the API: https://hastebin.com/oxohagajel.xml
11-20-2017, 09:40 PM
There's an extra
Quote:} on line 31 in /api/index.php
11-20-2017, 09:44 PM
Updated to fix that: https://hastebin.com/afejuquqoc.xml
11-20-2017, 09:45 PM
The changes you made to /api/ fixed the issue (I checked on database to see that 2-factor auth is enabled for the user), but attempt to sign in without an auth code and it allows the user with just their user and pass.
Any idea why?
11-20-2017, 09:46 PM
Also
Quote:PHP Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) To fix it I did Quote: $currentUser = $user->data();
11-20-2017, 10:08 PM
You can rework how you want the API to detect logged in users however you want. I just changed mine a bit after you said that.
|