Passwordless authentication in Laravel without relying on third-party packages.
git clone https://github.com/kennyalmendral/laravel-passwordless-authentication.git
cd laravel-passwordless-authentication
composer install
cp .env.example .env
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}"
php artisan key:generate
php artisan migrate
php artisan serve
https://kennyalmendral.com/laravel-passwordless-authentication/