Skip to content

Latest commit

 

History

History
51 lines (40 loc) · 1.34 KB

File metadata and controls

51 lines (40 loc) · 1.34 KB

Laravel Passwordless Authentication

Passwordless authentication in Laravel without relying on third-party packages.

Clone this repository

git clone https://github.com/kennyalmendral/laravel-passwordless-authentication.git

cd laravel-passwordless-authentication

Install dependencies

composer install

Create local environment file

cp .env.example .env

Configure mail settings

We'll be using an email delivery platform called Mailtrap, as it's both free and user-friendly for email testing. If you don't have an account yet, create one and obtain the SMTP credentials, then add them to your application's .env file:

MAIL_MAILER=smtp
MAIL_HOST=sandbox.smtp.mailtrap.io
MAIL_PORT=587
MAIL_USERNAME=YOUR_MAILTRAP_SMTP_USERNAME
MAIL_PASSWORD=YOUR_MAILTRAP_SMTP_PASSWORD
MAIL_ENCRYPTION=tls
MAIL_FROM_NAME="${APP_NAME}"

Generate a new random encryption key

php artisan key:generate

Run the database migrations

php artisan migrate

Start the development server

php artisan serve

Read the blog post

https://kennyalmendral.com/laravel-passwordless-authentication/