Skip to content

Fix issue with page reload/refresh on two-factor-challenge page #1291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
</x-slot>

<div x-data="{ recovery: false }">
<div class="mb-4 text-sm text-gray-600 dark:text-gray-400" x-show="! recovery">
<div class="mb-4 text-sm text-gray-600 dark:text-gray-400" x-cloak x-show="! recovery">
{{ __('Please confirm access to your account by entering the authentication code provided by your authenticator application.') }}
</div>

<div class="mb-4 text-sm text-gray-600 dark:text-gray-400" x-show="recovery">
<div class="mb-4 text-sm text-gray-600 dark:text-gray-400" x-cloak x-show="recovery">
{{ __('Please confirm access to your account by entering one of your emergency recovery codes.') }}
</div>

Expand All @@ -18,18 +18,19 @@
<form method="POST" action="{{ route('two-factor.login') }}">
@csrf

<div class="mt-4" x-show="! recovery">
<div class="mt-4" x-cloak x-show="! recovery">
<x-label for="code" value="{{ __('Code') }}" />
<x-input id="code" class="block mt-1 w-full" type="text" inputmode="numeric" name="code" autofocus x-ref="code" autocomplete="one-time-code" />
</div>

<div class="mt-4" x-show="recovery">
<div class="mt-4" x-cloak x-show="recovery">
<x-label for="recovery_code" value="{{ __('Recovery Code') }}" />
<x-input id="recovery_code" class="block mt-1 w-full" type="text" name="recovery_code" x-ref="recovery_code" autocomplete="one-time-code" />
</div>

<div class="flex items-center justify-end mt-4">
<button type="button" class="text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 underline cursor-pointer"
x-cloak
x-show="! recovery"
x-on:click="
recovery = true;
Expand All @@ -39,6 +40,7 @@
</button>

<button type="button" class="text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 underline cursor-pointer"
x-cloak
x-show="recovery"
x-on:click="
recovery = false;
Expand Down
2 changes: 2 additions & 0 deletions stubs/resources/css/app.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

[x-cloak] { display: none; }