Skip to content

Commit

Permalink
Merge pull request #6 from LifeOnScreen/development
Browse files Browse the repository at this point in the history
[Feature] Added CSFR support
  • Loading branch information
janicerar authored Oct 23, 2018
2 parents a9b684a + 339974b commit 2607acb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions resources/views/authenticate.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function checkAutoSubmit(el) {

<form id="authenticate_form" class="bg-white shadow rounded-lg p-8 max-w-xl mx-auto" method="POST"
action="/los/2fa/authenticate">
@csrf
<h2 class="p-2">Two Factor Authentication</h2>

<p class="p-2">Two factor authentication (2FA) strengthens access security by requiring two methods (also
Expand Down
2 changes: 1 addition & 1 deletion resources/views/recovery.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

<form class="bg-white shadow rounded-lg p-8 max-w-xl mx-auto" method="POST" action="/los/2fa/register">
<h2 class="p-2">Recovery codes</h2>

@csrf
<p class="p-2">
Recovery codes are used to access your account in the event you cannot recive two-factor
authentication codes.
Expand Down
1 change: 1 addition & 0 deletions resources/views/register.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function checkAutoSubmit(el) {

<form id="register_form" class="bg-white shadow rounded-lg p-8 max-w-xl mx-auto" method="POST"
action="/los/2fa/confirm">
@csrf
<h2 class="p-2">Two Factor Authentication</h2>

<p class="p-2">Two factor authentication (2FA) strengthens access security by requiring two methods (also
Expand Down
4 changes: 2 additions & 2 deletions src/Google2fa.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function confirm()
$authenticator = app(Google2FAAuthenticator::class);
$authenticator->login();

return response()->redirectTo('/nova');
return response()->redirectTo(config('nova.path'));
}

$google2fa = new G2fa();
Expand Down Expand Up @@ -121,7 +121,7 @@ public function authenticate()
$authenticator = app(Google2FAAuthenticator::class);
$authenticator->login();

return response()->redirectTo('/nova');
return response()->redirectTo(config('nova.path'));
}
$data['error'] = 'One time password is invalid.';

Expand Down

0 comments on commit 2607acb

Please sign in to comment.