2023-03-24 13:54:17 +00:00
|
|
|
<x-layout>
|
2023-06-01 10:15:33 +00:00
|
|
|
<h1>Profile</h1>
|
2023-08-14 12:00:10 +00:00
|
|
|
<div class="subtitle ">Your user profile settings.</div>
|
2023-08-11 18:19:42 +00:00
|
|
|
<livewire:profile.form :request="$request" />
|
2023-08-14 12:00:10 +00:00
|
|
|
<h2 class="py-4">Subscription</h2>
|
2023-08-30 14:01:38 +00:00
|
|
|
<a href="{{ route('team.index') }}">Check in Team Settings</a>
|
2023-08-14 12:00:10 +00:00
|
|
|
<h2 class="py-4">Two-factor Authentication</h2>
|
2023-06-01 10:15:33 +00:00
|
|
|
@if (session('status') == 'two-factor-authentication-enabled')
|
2023-06-16 10:35:40 +00:00
|
|
|
<div class="mb-4 font-medium">
|
2023-06-01 10:15:33 +00:00
|
|
|
Please finish configuring two factor authentication below. Read the QR code or enter the secret key
|
|
|
|
manually.
|
|
|
|
</div>
|
|
|
|
<div class="flex flex-col gap-2">
|
2023-08-31 07:56:37 +00:00
|
|
|
<form action="/user/confirmed-two-factor-authentication" method="POST" class="flex items-end gap-2">
|
2023-06-01 10:15:33 +00:00
|
|
|
@csrf
|
2023-08-11 18:19:42 +00:00
|
|
|
<x-forms.input type="number" id="code" label="One-time code" required />
|
2023-06-01 10:15:33 +00:00
|
|
|
<x-forms.button type="submit">Validate 2FA</x-forms.button>
|
|
|
|
</form>
|
|
|
|
<div>
|
|
|
|
<div>{!! $request->user()->twoFactorQrCodeSvg() !!}</div>
|
2023-06-07 08:33:45 +00:00
|
|
|
<div x-data="{ showCode: false }" class="py-2">
|
2023-06-01 10:15:33 +00:00
|
|
|
<template x-if="showCode">
|
2023-06-16 10:35:40 +00:00
|
|
|
<div class="py-2 ">{!! decrypt($request->user()->two_factor_secret) !!}</div>
|
2023-06-01 10:15:33 +00:00
|
|
|
</template>
|
2023-08-31 07:56:37 +00:00
|
|
|
<x-forms.button x-on:click="showCode = !showCode">Show secret key to manually
|
|
|
|
enter</x-forms.button>
|
2023-06-01 10:15:33 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@elseif(session('status') == 'two-factor-authentication-confirmed')
|
2023-06-16 10:35:40 +00:00
|
|
|
<div class="mb-4 ">
|
2023-06-01 10:15:33 +00:00
|
|
|
Two factor authentication confirmed and enabled successfully.
|
|
|
|
</div>
|
|
|
|
<div>
|
2023-06-16 10:35:40 +00:00
|
|
|
<div class="pb-6 ">Here are the recovery codes for your account. Please store them in a secure
|
2023-08-08 09:51:36 +00:00
|
|
|
location.
|
|
|
|
</div>
|
2023-06-01 10:15:33 +00:00
|
|
|
<div class="text-white">
|
|
|
|
@foreach ($request->user()->recoveryCodes() as $code)
|
|
|
|
<div>{{ $code }}</div>
|
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@else
|
|
|
|
@if ($request->user()->two_factor_confirmed_at)
|
2023-08-31 07:56:37 +00:00
|
|
|
<div class="pb-4 "> Two factor authentication is <span class="text-helper">enabled</span>.</div>
|
2023-06-01 10:15:33 +00:00
|
|
|
<div class="flex gap-2">
|
|
|
|
<form action="/user/two-factor-authentication" method="POST">
|
|
|
|
@csrf
|
|
|
|
@method ('DELETE')
|
|
|
|
<x-forms.button type="submit">Disable</x-forms.button>
|
|
|
|
</form>
|
|
|
|
<form action="/user/two-factor-recovery-codes" method="POST">
|
|
|
|
@csrf
|
|
|
|
<x-forms.button type="submit">Regenerate Recovery Codes</x-forms.button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
@if (session('status') == 'recovery-codes-generated')
|
|
|
|
<div>
|
2023-06-16 10:35:40 +00:00
|
|
|
<div class="py-6 ">Here are the recovery codes for your account. Please store them in a
|
2023-06-01 10:15:33 +00:00
|
|
|
secure
|
2023-08-08 09:51:36 +00:00
|
|
|
location.
|
|
|
|
</div>
|
2023-06-01 10:15:33 +00:00
|
|
|
<div class="text-white">
|
|
|
|
@foreach ($request->user()->recoveryCodes() as $code)
|
|
|
|
<div>{{ $code }}</div>
|
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
@else
|
|
|
|
<form action="/user/two-factor-authentication" method="POST">
|
|
|
|
@csrf
|
|
|
|
<x-forms.button type="submit">Configure 2FA</x-forms.button>
|
|
|
|
</form>
|
|
|
|
@endif
|
|
|
|
@endif
|
2023-08-31 07:56:37 +00:00
|
|
|
@if (session()->has('errors'))
|
|
|
|
<div class="text-error">
|
|
|
|
Something went wrong. Please try again.
|
|
|
|
</div>
|
|
|
|
@endif
|
2023-03-24 13:54:17 +00:00
|
|
|
</x-layout>
|