]> BookStack Code Mirror - bookstack/blob - resources/views/mfa/setup.blade.php
Worked on MFA setup required flow
[bookstack] / resources / views / mfa / setup.blade.php
1 @extends('simple-layout')
2
3 @section('body')
4     <div class="container small py-xl">
5
6         <div class="card content-wrap auto-height">
7             <h1 class="list-heading">Setup Multi-Factor Authentication</h1>
8             <p class="mb-none">
9                 Setup multi-factor authentication as an extra layer of security
10                 for your user account.
11             </p>
12
13             <div class="setting-list">
14                 <div class="grid half gap-xl">
15                     <div>
16                         <div class="setting-list-label">Mobile App</div>
17                         <p class="small">
18                             To use multi-factor authentication you'll need a mobile application
19                             that supports TOTP such as Google Authenticator, Authy or Microsoft Authenticator.
20                         </p>
21                     </div>
22                     <div class="pt-m">
23                         @if($userMethods->has('totp'))
24                             <div class="text-pos">
25                                 @icon('check-circle')
26                                 Already configured
27                             </div>
28                             <a href="{{ url('/mfa/totp/generate') }}" class="button outline small">Reconfigure</a>
29                             <div component="dropdown" class="inline relative">
30                                 <button type="button" refs="dropdown@toggle" class="button outline small">Remove</button>
31                                 <div refs="dropdown@menu" class="dropdown-menu">
32                                     <p class="text-neg small px-m mb-xs">Are you sure you want to remove this multi-factor authentication method?</p>
33                                     <form action="{{ url('/mfa/remove/totp') }}" method="post">
34                                         {{ csrf_field() }}
35                                         {{ method_field('delete') }}
36                                         <button class="text-primary small delete">{{ trans('common.confirm') }}</button>
37                                     </form>
38                                 </div>
39                             </div>
40                         @else
41                             <a href="{{ url('/mfa/totp/generate') }}" class="button outline">Setup</a>
42                         @endif
43                     </div>
44                 </div>
45
46                 <div class="grid half gap-xl">
47                     <div>
48                         <div class="setting-list-label">Backup Codes</div>
49                         <p class="small">
50                             Securely store a set of one-time-use backup codes
51                             which you can enter to verify your identity.
52                         </p>
53                     </div>
54                     <div class="pt-m">
55                         @if($userMethods->has('backup_codes'))
56                             <div class="text-pos">
57                                 @icon('check-circle')
58                                 Already configured
59                             </div>
60                             <a href="{{ url('/mfa/backup_codes/generate') }}" class="button outline small">Reconfigure</a>
61                             <div component="dropdown" class="inline relative">
62                                 <button type="button" refs="dropdown@toggle" class="button outline small">Remove</button>
63                                 <div refs="dropdown@menu" class="dropdown-menu">
64                                     <p class="text-neg small px-m mb-xs">Are you sure you want to remove this multi-factor authentication method?</p>
65                                     <form action="{{ url('/mfa/remove/backup_codes') }}" method="post">
66                                         {{ csrf_field() }}
67                                         {{ method_field('delete') }}
68                                         <button class="text-primary small delete">{{ trans('common.confirm') }}</button>
69                                     </form>
70                                 </div>
71                             </div>
72                         @else
73                             <a href="{{ url('/mfa/backup_codes/generate') }}" class="button outline">Setup</a>
74                         @endif
75                     </div>
76                 </div>
77             </div>
78
79         </div>
80     </div>
81 @stop