New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

tomgrohl/laravel-memory-auth-provider

Laravel In memory auth provider.
2,281 3
Install
composer require tomgrohl/laravel-memory-auth-provider
Latest Version:1.0.1
License:MIT
Last Updated:Apr 13, 2020
Links: GitHub  ·  Packagist
Maintainer: tomgrohl

Latest Stable Version Latest Unstable Version License

Laravel Memory Auth Provider

A In Memory User Auth Provider for Laravel 5.1+.

Allows you to Authenticate and admin area without the need for a database. Great as a quick and temporary solution during development, particularly if your site is mocked out and not let using a database.

Installation

You can install it using composer:

composer require tomgrohl/laravel-memory-auth-provider

Configuration

1 .Add service provider

Add the following to your providers in the app config

<?php

return [
    
    //...
    
    'providers' => [
        //...    
        'Tomgrohl\Laravel\Auth\AuthServiceProvider',
        
        // OR
        \Tomgrohl\Laravel\Auth\AuthServiceProvider::class,
    ]
    
    
];

2. Setup config

In the auth config you will need to set the driver:

    'driver' => 'memory',

Add also setup your in memory users:

    'memory' => [
        'model' => 'Illuminate\Auth\GenericUser',
        'users' => [
    
            'admin' => [
                'id' => 1,
                // Hashed passord using the hasher service
                'password' => '$2y$10$Mfusxb1546MFxQ4A1s4GE.OF/gFuI8Y6Hw9xnlZeiHtjDl0/pnXPK',
            ],
        ],
    ],

You can add any properties you want making it easy to switch out the Auth drivers.

The package comes with a command for hashing passwords, making it easier to setup passwords, just run the following command to hash your password:

php artisan tomgrohl:hash:password mypassword

Related Packages

masim-appcrates/laravel-authentication

My Custome Laravel Authentication

6 0
laravel/fortify

Backend controllers and scaffolding for Laravel authentication.

72,824,586 1,760
laravel/breeze

Minimal Laravel authentication scaffolding with Blade and Tailwind.

45,396,334 3,059
devdojo/auth

The auth package to make authentication in your laravel applications easy to use...

272,507 621
ems/permit

Permission based authentication system

8,852 0

Version History

Version Released License
1.0.1 MIT
1.0.0 MIT