The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2-Factor Authentication (2FA - Done)
#21
/api/?action=verify2FA&twoCode=blabla
  Reply
#22
It says it's been validated, also states it within dev tools http://prntscr.com/hd2odk
  Reply
#23
you sent it blabla or the code from your phone?
  Reply
#24
you got it working?
  Reply
#25
Code updated again. I added an if statement to the API: https://hastebin.com/oxohagajel.xml
  Reply
#26
There's an extra

Quote:}

on line 31 in /api/index.php
  Reply
#27
Updated to fix that: https://hastebin.com/afejuquqoc.xml
  Reply
#28
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?
  Reply
#29
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();
if(isset($currentUser)) {

  Reply
#30
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.
  Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)