BookStack/app/Http/Controllers/Auth/MfaController.php
Dan Brown 529971c534
Added backup code setup flow
- Includes testing to cover flow.
- Moved TOTP logic to its own controller.
- Added some extra totp tests.
2021-07-02 20:53:33 +01:00

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,
]);
}
}