Download the PHP package parvezmia/laravel-passwordless-auth without Composer

On this page you can find all versions of the php package parvezmia/laravel-passwordless-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-passwordless-auth

Laravel Passwordless Authentication

A simple, secure passwordless authentication system for Laravel applications. This package provides a complete solution for implementing magic link authentication in your Laravel projects.

Installation

You can install the package via composer:

Configuration

After installation, publish the package assets:

This will publish:

Configuration Options

The published configuration file (config/passwordless-auth.php) contains the following options:

Database Setup

Run the migrations to create the necessary database tables:

This creates a login_tokens table to store the temporary login tokens.

Queue Configuration

This package uses Laravel's queue system to send emails asynchronously for better performance. To configure the queue:

  1. Set up your preferred queue driver in your .env file:

  2. If using the database driver, run the queue migration:

  3. Start the queue worker:

Route Integration

To include the passwordless authentication routes in your application, add the following line to your routes/web.php file:

Available Routes

The package provides the following routes:

Method URI Name Description
GET /login/passwordless passwordless.login Displays the login form
POST /login/passwordless passwordless.send Processes the login request and sends link
GET /login/passwordless/verify/{token} passwordless.verify Verifies token and logs user in
POST /logout passwordless.logout Logs the user out

Email Configuration

For the email functionality to work properly, ensure your Laravel application has proper email configuration in your .env file:

Customization

Publishing Specific Components

You can publish specific components of the package:

Customizing Views

After publishing the views, you can customize them in resources/views/vendor/passwordless-auth/.

Usage Examples

Adding Login Link to Your Application

Adding Logout Button

Login Flow

  1. User visits the login page and enters their email address
  2. A unique, secure token is generated and stored in the database
  3. An email with a login link containing the token is sent to the user
  4. User clicks the link in their email
  5. The token is verified and the user is automatically logged in
  6. The token is deleted to prevent reuse

Troubleshooting

Email Issues

If emails are not being sent:

  1. Check your Laravel log files for errors: storage/logs/laravel.log
  2. Verify your mail configuration in .env
  3. Try using the log mail driver for testing: MAIL_MAILER=log
  4. Ensure the user model has the Notifiable trait
  5. Clear config cache: php artisan config:clear

Route Issues

If routes are not working:

  1. Make sure you've included the routes file in your web.php
  2. Clear route cache: php artisan route:clear
  3. Check for route conflicts with php artisan route:list

Security Considerations

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-passwordless-auth with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
illuminate/contracts Version ^10.0||^11.0||^12.0
illuminate/support Version ^10.0||^11.0||^12.0
illuminate/database Version ^10.0||^11.0||^12.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package parvezmia/laravel-passwordless-auth contains the following files

Loading the files please wait ...