]> BookStack Code Mirror - bookstack/blob - app/Http/Controllers/Auth/MfaController.php
Added backup code setup flow
[bookstack] / app / Http / Controllers / Auth / MfaController.php
1 <?php
2
3 namespace BookStack\Http\Controllers\Auth;
4
5 use BookStack\Http\Controllers\Controller;
6
7 class MfaController extends Controller
8 {
9     /**
10      * Show the view to setup MFA for the current user.
11      */
12     public function setup()
13     {
14         $userMethods = user()->mfaValues()
15             ->get(['id', 'method'])
16             ->groupBy('method');
17         return view('mfa.setup', [
18             'userMethods' => $userMethods,
19         ]);
20     }
21 }