Skip to content

Commit

Permalink
fix 2fa
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiritin committed Jul 7, 2024
1 parent e8773d5 commit a58b719
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/Http/Controllers/TwoFactorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ public function show(Request $request)
'twoFactors' => $twoFactors,
'lastUsedMethod' => $lastUsed,
'submitFormUrl' => URL::signedRoute('auth.two-factor.submit',
['login_challenge' => $request->get('login_challenge'), 'user' => $request->get('user')],
[
'login_challenge' => $request->get('login_challenge'),
'user' => $request->get('user'),
'remember' => $request->get('remember'),
],
now()->addMinutes(30)),
]);
}
Expand Down
2 changes: 1 addition & 1 deletion app/Services/Hydra/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function acceptLoginRequest(string $userId, string $loginChallenge, int $
try {
return Http::hydraAdmin()->put('/admin/oauth2/auth/requests/login/accept?challenge='.$loginChallenge, [
'subject' => $userId,
'remember' => !($remember === 0),
'remember' => ($remember !== 0),
'remember_for' => $remember,
])->json();

Expand Down

0 comments on commit a58b719

Please sign in to comment.