At Passkey Login support to Laravel
Go to file
2024-07-22 22:33:31 +10:00
src Moved create passkey javascript into js/passkey.js 2024-07-22 22:33:31 +10:00
composer.json Initial implementation 2024-04-25 15:05:51 +10:00
README.md Moved create passkey javascript into js/passkey.js 2024-07-22 22:33:31 +10:00

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>