mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-12-03 14:23:42 +08:00
529971c534
- Includes testing to cover flow. - Moved TOTP logic to its own controller. - Added some extra totp tests.
22 lines
452 B
PHP
22 lines
452 B
PHP
<?php
|
|
|
|
namespace BookStack\Http\Controllers\Auth;
|
|
|
|
use BookStack\Http\Controllers\Controller;
|
|
|
|
class MfaController extends Controller
|
|
{
|
|
/**
|
|
* Show the view to setup MFA for the current user.
|
|
*/
|
|
public function setup()
|
|
{
|
|
$userMethods = user()->mfaValues()
|
|
->get(['id', 'method'])
|
|
->groupBy('method');
|
|
return view('mfa.setup', [
|
|
'userMethods' => $userMethods,
|
|
]);
|
|
}
|
|
}
|