feat(social-login): add section to set new pass

Signed-off-by: miguel456 <me@nogueira.codes>
This commit is contained in:
Miguel Nogueira 2022-10-09 21:42:19 +01:00
parent 1de9de2a9b
commit 34da0d4ead
No known key found for this signature in database
GPG Key ID: 3C6A7E29AF26D370

View File

@ -263,6 +263,35 @@
</div>
@endif
@if (Auth::user()->hasDiscordConnection())
<h5><i class="fab fa-discord"></i> {{ __('Your :appName account is linked to Discord', ['appName' => config('app.name')]) }}</h5>
<p>{!! __('Your account is linked to Discord, which means you only need your Discord account credentials and two-factor code (if enabled) to sign in. If you would like to change your password, you will need to do so in your Discord account settings. Please <a href=":articleLink" target="_blank">read this article</a> to learn more.', ['articleLink' => 'https://support.discord.com/hc/en-us/articles/218410947-I-forgot-my-Password-Where-can-I-set-a-new-one-']) !!}</p>
<p>{{ __('Alternatively, you can unlink your Discord account and set a password which you can use to sign in. Please note that any roles and/or privileges you may have been given as a result of this integration may be automatically removed until you link your Discord account again.') }}</p>
<form method="POST" action="" id="setPassword">
@csrf
@method('PATCH')
<p class="text-bold"><i class="fas fa-key"></i> {{ __('Setting a new password:') }}</p>
<div class="row">
<div class="col">
<label for="unlinkNewPassword">{{ __('New password') }}</label>
<input type="password" name="newpass" id="unlinkNewPassword" class="form-control">
</div>
<div class="col">
<label for="unlinkConfirmNewPassword">{{ __('Confirm new password') }}</label>
<input type="password" name="newpass_confirm" if="unlinkConfirmNewPassword" class="form-control">
</div>
</div>
<button type="submit" class="btn btn-warning btn-md mt-4 mb-2"><i class="fas fa-check"></i> {{ __('Set password and unlink account') }}</button>
</form>
@else
<h5 class="card-title">{{__('Change Password')}}</h5>
<p class="card-text">{{__('Change your password here. This will log you out from all existing sessions for your security.')}}</p>
@ -287,6 +316,7 @@
</form>
<button {{ ($demoActive) ? 'disabled' : '' }} class="btn btn-success" type="button" onclick="document.getElementById('changePassword').submit()">{{__('Change Password')}}</button>
@endif
</div>
<div class="tab-pane fade p-3" id="twofa" role="tabpanel" aria-labelledby="twofaTab">
<h5 class="card-title">{{__('Two Factor Authentication')}}</h5>