Download the PHP package dam1r89/passwordless-auth without Composer

On this page you can find all versions of the php package dam1r89/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 passwordless-auth

Laravel Passwordless Auth

Features

To get started, install package with composer:

composer require dam1r89/passwordless-auth

Register the dam1r89\PasswordlessAuth\PasswordlessAuthServiceProvider provider in config/app.php configuration file.

dam1r89\PasswordlessAuth\PasswordlessAuthServiceProvider::class,

Publish configuration.

php artisan vendor:publish --tag=passwordless

Configuration file:

/*
 * Route prefix for sign-in/sign-up form.
 */
'route_prefix' => 'passwordless',

/*
 * This is a model to which LoginToken is saving reference to.
 * Almost always this will be User class.
 */
'provider' => \App\User::class,

/*
 * Number of seconds user must wait before receiving new sign-up link.
 */
'throttle' => 60 * 10,

/*
 * Should user be automatically signed-up if email is not already used
 */
'sign_up' => true,

/*
 * Default redirect to
 * Redirect url after user is signed in and intended url is not set
 */
'redirect_to' => 'home',

/*
 * If user should be "remembered" after sign-in.
 */
'remember' => true,

User must implement dam1r89\PasswordlessAuth\Contracts\UsersProvider contract or if user is instance of eloquent model just use UsersRepository trait.

use dam1r89\PasswordlessAuth\UsersRepository;
use dam1r89\PasswordlessAuth\Contracts\UsersProvider;

class User extends SparkUser implements UsersProvider
{
    use UsersRepository;

... and run migration

php artisan migrate

Using passwordless as a default sign-in method

For Laravel < 5.5

In /app/Exceptions/Handler.php change return redirect()->guest(route('login')); to:

return redirect()->guest(route('passwordless.login'));

For Larvel 5.5+

Since Laravel 5.5 the unauthenticated() function in /app/Exceptions/Handler.php has moved to vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php.

You can still use this method but you have to override it. In your app/Exceptions/Handler.php file include:

and add the unauthenticated function:

Visual

Publish views and email template.

php artisan vendor:publish --tag=passwordless-views

Views are located under resources/views/vendor/passwordless folder.

To replace current login link with passwordless use this route name:

<a href="{{ route('passwordless') }}">Login</a>

Passwordless Links

Sometimes you want to send a link via email that will automatically sign-in user. You can do that with PasswordlessLink class. Exemple for notifications.

use dam1r89\PasswordlessAuth\PasswordlessLink;

$link = PasswordlessLink::for($notifiable)->url('/route/to/resource');

Note: It is dangerous to forward emails with unused sign-in links because link gives direct access to account.

Similar package

Laravel Passwordless Auth


All versions of passwordless-auth with dependencies

PHP Build Version
Package Version
No informations.
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 dam1r89/passwordless-auth contains the following files

Loading the files please wait ....