Instantly login as user via a single button tap on dev environments.

Overview

quintenbuis/laravel-instant-login Banner

Latest Version on Packagist GitHub Tests Action Status StyleCI Total Downloads

Getting tired of always entering login details in local dev environments? This package adds a button to instantly login a user!

Installation

You can install the package via composer:

composer require quintenbuis/laravel-instant-login

You can publish the config file with:

php artisan vendor:publish --provider="Quintenbuis\InstantLogin\InstantLoginServiceProvider" --tag="instant-login-config"

You can publish the views with:

php artisan vendor:publish --provider="Quintenbuis\InstantLogin\InstantLoginServiceProvider" --tag="instant-login-views"

This is the contents of the published config file:



return [
    // The model that needs to be signed in
    'model' => \App\Models\User::class,

    // The guard where it must be signed in at
    'guard' => 'web',

    // Route information
    'route' => [
        'name' => 'instant-login',
        'url'  => '/instant-login',
    ],

    // The fallback url when there is no intended route stored
    'redirect' => null,
];

Usage

Add the login button to your view with:

">
<x-instant-login::button />

{{-- Adding custom classes --}}
<x-instant-login::button class="bg-red-600" />

And it will login the first user it finds.

The instant login button protects against production environments by default.

If you want to customize which user to get you can add the following to (for example) your AppServiceProvider:

InstantLogin::filterUsing([
    ['email' => '[email protected]'],
    ['admin' => true]
]);

This will be going through the where() method on the model.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

You might also like...
Un proyecto que crea una API de usuarios para registro, login y luego acceder a su información mediante autenticación con JSON Web Token

JSON WEB TOKEN CON LARAVEL 8 Prueba de autenticación de usuarios con una API creada en Laravel 8 Simple, fast routing engine. License The Laravel fram

Register ,Login , Logout , having access control
Register ,Login , Logout , having access control

Helo what's up dude read by the name of creator lov3yp :D This script is inspired by Lov3yp#2018 And Burak karahan Installation steps: !- Import the s

Laravel package to easily login as other users during development.
Laravel package to easily login as other users during development.

A Laravel 5.4 utility package to enable developers to log in as other users during development. Installation To install the package, simply follow the

A complete Login and Register page using a Mysql Database and php
A complete Login and Register page using a Mysql Database and php

Login With Mysql A complete Login and Register page using a Mysql Database 🔨 Built with ⚙️ 📝 Description A login with Frontend, Backend and Database

Login Using Laravel UI

Projeto Laravel utilizando a biblioteca Laravel UI para autenticação de usuários com Username e Senha.

Login & Register using laravel 8

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

PHP Login and Registration Script

dj_login PHP Login and Registration Script To function this script requires you put your MySQL info into both login.php and register.php, and have the

This extension expands WSOAuth extension and provide a EveOnline SSO login method

This extension expands WSOAuth extension and provide a EveOnline SSO login method

A simple, safe magic login link generator for Laravel

Laravel Passwordless Login A simple, safe magic login link generator for Laravel This package provides a temporary signed route that logs in a user. W

Releases(1.0.2)
Owner
Quinten Buis
@laravel / @livewire / @vuejs Enthusiast 🔥🚀
Quinten Buis
A minimal package that helps you login with any password on local environments

Laravel Anypass Built with ❤️ for every "lazy" laravel developer ;) It is always painful to remember and type in the correct password in the login for

Iman 208 Jan 1, 2023
Laravel Auth is a Complete Build of Laravel 8 with Email Registration Verification, Social Authentication, User Roles and Permissions, User Profiles, and Admin restricted user management system.

Laravel Auth is a Complete Build of Laravel 8 with Email Registration Verification, Social Authentication, User Roles and Permissions, User Profiles, and Admin restricted user management system. Built on Bootstrap 4.

Jeremy Kenedy 2.8k Dec 31, 2022
User registration and login form with validations and escapes for total security made with PHP.

Login and Sign Up with PHP User registration and login form with validations and escapes for total security made with PHP. Validations Required fields

Alexander Pérez 2 Jan 26, 2022
Helps you securely setup a master password and login into user accounts with it.

?? Make your Login form smart in a minute! Built with ❤️ for every smart laravel developer Helps you set a master password in .env file and login into

Iman 341 Jan 1, 2023
Jasny SSO is a relatively simply and straightforward solution for single sign on (SSO).

Single Sign-On for PHP (Ajax compatible) Jasny SSO is a relatively simply and straightforward solution for single sign on (SSO). With SSO, logging int

Arnold Daniels 1.4k Jan 6, 2023
Single file PHP that can serve as a JWT based authentication provider to the PHP-CRUD-API project

Single file PHP that can serve as a JWT based authentication provider to the PHP-CRUD-API project

Maurits van der Schee 163 Dec 18, 2022
Single Sign-On for PHP (Ajax compatible)

Single Sign-On for PHP (Ajax compatible) Jasny SSO is a relatively simply and straightforward solution for single sign on (SSO). With SSO, logging int

Arnold Daniels 1.4k Jan 6, 2023
A whitelabeled and modernized wp-login.php

Modern Login Here lives a simple mu-plugin to whitelabel and modernize wp-login.php. No admin panels, no bloat – just a simple filter to optionally cu

Brandon 65 Dec 22, 2022
A Laravel 5 package for OAuth Social Login/Register implementation using Laravel socialite and (optionally) AdminLTE Laravel package

laravel-social A Laravel 5 package for OAuth Social Login/Register implementation using Laravel socialite and (optionally) AdminLTE Laravel package. I

Sergi Tur Badenas 42 Nov 29, 2022
Braindead simple social login with Laravel and Eloquent.

Important: This package is not actively maintained. For bug fixes and new features, please fork. Eloquent OAuth Use the Laravel 4 wrapper for easy int

Adam Wathan 374 Dec 21, 2022