PHPackages                             norbybaru/passwordless-auth - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. norbybaru/passwordless-auth

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

norbybaru/passwordless-auth
===========================

Laravel Passwordless login - Magic link

v1.2.0(2y ago)217423[3 PRs](https://github.com/norbybaru/laravel-passwordless-authentication/pulls)MITPHPPHP ^8.0CI passing

Since Sep 9Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/norbybaru/laravel-passwordless-authentication)[ Packagist](https://packagist.org/packages/norbybaru/passwordless-auth)[ RSS](/packages/norbybaru-passwordless-auth/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (5)Versions (8)Used By (0)

[![Run Unit Tests](https://github.com/norbybaru/laravel-passwordless-authentication/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/norbybaru/laravel-passwordless-authentication/actions/workflows/run-tests.yml) [![PHPStan](https://github.com/norbybaru/laravel-passwordless-authentication/actions/workflows/phpstan.yml/badge.svg?branch=main)](https://github.com/norbybaru/laravel-passwordless-authentication/actions/workflows/phpstan.yml) [![Laravel Pint](https://github.com/norbybaru/laravel-passwordless-authentication/actions/workflows/pint.yml/badge.svg?branch=main)](https://github.com/norbybaru/laravel-passwordless-authentication/actions/workflows/pint.yml)

[![PASSWORDLESS-AUTH](./loginlink.png)](./loginlink.png)

LARAVEL PASSWORDLESS AUTHENTICATION
===================================

[](#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
------------

[](#installation)

```
composer require norbybaru/passwordless-auth
```

Publishing the config file
--------------------------

[](#publishing-the-config-file)

```
php artisan vendor:publish --provider="NorbyBaru\Passwordless\PasswordlessServiceProvider" --tag="passwordless-config"
```

Preparing the database
----------------------

[](#preparing-the-database)

Publish the migration to create required table:

```
php artisan vendor:publish --provider="NorbyBaru\Passwordless\PasswordlessServiceProvider" --tag="passwordless-migrations"
```

Run migrations.

```
php artisan migrate
```

Basic Usage
===========

[](#basic-usage)

Preparing Model
---------------

[](#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

```
