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
/printthread.php 16 require_once



UserSpice
Force to use 2FA -always- - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.4 (https://userspice.com/forums/forumdisplay.php?fid=27)
+--- Thread: Force to use 2FA -always- (/showthread.php?tid=1573)



Force to use 2FA -always- - Coiram - 07-07-2019

Hi,

First of all congratulations for this excellent tool.  To be honest, I am also thinking to donate . . . this means that I really  Heart this tool.

I have a question, though:

  • - I  want 2FA forced on users 

The application idea for this tool is to: 

  • - create users myself
  • - sent them their email containing their login details


When they log in the first time they MUST set their password and their 2FA -not leave it optional-

I could not see this setup, unless I am sleepping deprived or unable to read the guidelines.

Could someone tell me whether this is possible?

Cheers,

Coiram


RE: Force to use 2FA -always- - Brandin - 07-12-2019

Hi Coiram,

Sorry for the delay on getting back to your request. 2Fa enforcement is not native to UserSpice. You can enforce this by checking if:
-the user is not on a 2Fa configuration page
-the user has not setup 2Fa (check the values in the $users->data()

If both the above are not met, I would redirect them to account.php?err=You must configure Two Factor Authentication or you can redirect them directly to the manage 2fa page.

Brandin.