two-factor-challenge.blade.php 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <x-guest-layout>
  2. <x-jet-authentication-card>
  3. <x-slot name="logo">
  4. <x-jet-authentication-card-logo />
  5. </x-slot>
  6. <div x-data="{ recovery: false }">
  7. <div class="mb-4 text-sm text-gray-600" x-show="! recovery">
  8. {{ __('Please confirm access to your account by entering the authentication code provided by your authenticator application.') }}
  9. </div>
  10. <div class="mb-4 text-sm text-gray-600" x-show="recovery">
  11. {{ __('Please confirm access to your account by entering one of your emergency recovery codes.') }}
  12. </div>
  13. <x-jet-validation-errors class="mb-4" />
  14. <form method="POST" action="{{ route('two-factor.login') }}">
  15. @csrf
  16. <div class="mt-4" x-show="! recovery">
  17. <x-jet-label for="code" value="{{ __('Code') }}" />
  18. <x-jet-input id="code" class="block mt-1 w-full" type="text" inputmode="numeric" name="code" autofocus x-ref="code" autocomplete="one-time-code" />
  19. </div>
  20. <div class="mt-4" x-show="recovery">
  21. <x-jet-label for="recovery_code" value="{{ __('Recovery Code') }}" />
  22. <x-jet-input id="recovery_code" class="block mt-1 w-full" type="text" name="recovery_code" x-ref="recovery_code" autocomplete="one-time-code" />
  23. </div>
  24. <div class="flex items-center justify-end mt-4">
  25. <button type="button" class="text-sm text-gray-600 hover:text-gray-900 underline cursor-pointer"
  26. x-show="! recovery"
  27. x-on:click="
  28. recovery = true;
  29. $nextTick(() => { $refs.recovery_code.focus() })
  30. ">
  31. {{ __('Use a recovery code') }}
  32. </button>
  33. <button type="button" class="text-sm text-gray-600 hover:text-gray-900 underline cursor-pointer"
  34. x-show="recovery"
  35. x-on:click="
  36. recovery = false;
  37. $nextTick(() => { $refs.code.focus() })
  38. ">
  39. {{ __('Use an authentication code') }}
  40. </button>
  41. <x-jet-button class="ml-4">
  42. {{ __('Log in') }}
  43. </x-jet-button>
  44. </div>
  45. </form>
  46. </div>
  47. </x-jet-authentication-card>
  48. </x-guest-layout>