• Reading time ~ 1 min
  • 08.07.2022

Fast Login for Laravel is a plugin to allow your users to login with FaceID/TouchID:

This package supports various physical authentication devices:

Allow your users to register physical authentication devices (FaceID or TouchID on iPhones & Macs, fingerprint on Android, Hello on Windows and USB keys) to skip entering their login credentials.

The package takes care of (almost) everything you'll need to get this working in your app quickly. The server-side involves updating the User model with a CanFastLogin trait, and the document outlines the frontend usage you'll need to implement FaceID/TouchID logins.

Here's an example of the frontend code used to login a user with Touch/FaceID from the project's readme:

import Cookies from 'js-cookie'
import { useLogin } from '@web-auth/webauthn-helper'
 
const onClick = () => {
    const token = Cookies.get('XSRF-TOKEN')
 
    useLogin({
        actionUrl: route('fastlogin.login'),
        optionsUrl: route('fastlogin.login.details'),
        actionHeader: {
            'x-xsrf-token': token
        },
    }, {
        'x-xsrf-token': token
    })().then(() => {
        // the user has been logged in
 
        window.location.reload()
    })
}

You can learn more about this package, get full installation instructions, and view the source code on GitHub.

Comments

No comments yet
Yurij Finiv

Yurij Finiv

Full stack

ABOUT

Professional Fullstack Developer with extensive experience in website and desktop application development. Proficient in a wide range of tools and technologies, including Bootstrap, Tailwind, HTML5, CSS3, PUG, JavaScript, Alpine.js, jQuery, PHP, MODX, and Node.js. Skilled in website development using Symfony, MODX, and Laravel. Experience: Contributed to the development and translation of MODX3 i...

About author CrazyBoy49z
WORK EXPERIENCE
Contact
Ukraine, Lutsk
+380979856297