Download the PHP package norbybaru/passwordless-auth without Composer
On this page you can find all versions of the php package norbybaru/passwordless-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download norbybaru/passwordless-auth
More information about norbybaru/passwordless-auth
Files in norbybaru/passwordless-auth
Package passwordless-auth
Short Description Laravel Passwordless login - Magic link
License MIT
Informations about the package passwordless-auth
LARAVEL PASSWORDLESS AUTHENTICATION
Laravel Passwordless Authentication using Magic Link.
This package enables authentication through email links, eliminating the requirement for users to input passwords for authentication. Instead, it leverages the user's email address to send a login link to their inbox. Users can securely authenticate by clicking on this link. It's important to note that the package does not include a user interface for the authentication page; it assumes that the application's login page will be custom-built. Make sure to scaffold your login UI page accordingly to integrate seamlessly with this package.
PS. Email provider must be setup correctly and working to email magic link to authenticate user
Installation
Publishing the config file
Preparing the database
Publish the migration to create required table:
Run migrations.
Basic Usage
Preparing Model
Open the User::class
Model and ensure to implements NorbyBaru\Passwordless\CanUsePasswordlessAuthenticatable::class
and to add trait NorbyBaru\Passwordless\Traits\PasswordlessAuthenticatable::class
to the class
Preparing config/passwordless.php
Open config file config/passwordless.php
-
Update
default_redirect_route
to the correct route name the user should land by default once authenticated in case you have different route name thanhome
. eg. - Update
login_route
to the correct route name of your login page to allow redirecting user back to that page on invalid magic link. eg.
Setup Login Routes
Update application Login routes to sen Magic Link to user
Setup Mail Provider
Make sure to have your application mail provider setup and working 100% for your Laravel application
Setup Translations
Add file passwordless.php
in your translations directory and copy the entry below.
Feel free to update text to suit your application needs.
Advance Usage
Override MagicLinkNotification
To override default notification template, override method sendAuthenticationMagicLink
in your User model which implements interface CanUsePasswordlessAuthenticatable