At Passkey Login support to Laravel
src | ||
composer.json | ||
README.md |
Implementing passkey
Add passkey to user update form
<!-- Passkeys -->
<script type='text/javascript' src='{{ asset('/passkey/passkey.js') }}'></script>
<script type="text/javascript">
$(document).ready(function() {
$('#passkey').on('click',function(item) {
return passkey_create($(this),'{{ csrf_token() }}','fa-key','{{ ($o??$user)->passkey ? 'btn-success' : 'btn-outline-secondary' }}','btn-success','{{ ($o??$user)->passkey ? 'btn-secondary' : 'btn-outline-secondary' }}');
});
});
</script>
Enable passkey login
<!-- Passkeys -->
<script type='text/javascript' src='{{ asset('/passkey/passkey.js') }}'></script>
<script type="text/javascript">
passkey_check('{{ csrf_token() }}','/passkey/loggedin');
</script>