fahadyousafmahar / slash-login
Say goodbye to repetitively fill / submit login forms during development of your laravel applications. This package allows you to login as any user with just a "slash login" (/login/user_id)
Installs: 1 336
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 1
Forks: 1
Open Issues: 1
Requires
- php: ^7.4|^8.0
- illuminate/support: ^8.83.4|^9.3.1|^10.0|^11.0
Requires (Dev)
- orchestra/testbench: ^9.9
- phpunit/phpunit: ^10.0
README
Tired of repetitive logins during development? Let us Slash your Login!
Simplify your development workflow today with SlashLogin!
SlashLogin is a Laravel package designed to simplify your development / testing workflow. It allows you to quickly log in as any user in your application by accessing a configured route. It's perfect for developers who want to save time and effort by eliminating repetitive logins during development.
Key Features:
- Effortless Login: Login as any user with a single route.
- Flexible Configuration: Customize the login route, user model, redirect route, and more.
- Secure by Design: Designed for development environments only, ensuring production security.
- Easy Installation and Usage: Quick setup and intuitive configuration.
How It Works:
- Installation: Install using Composer (
composer require --dev fahadyousafmahar/slash-login
). - Configuration: Customize the settings in the configuration file (
config/slash-login.php
). - Usage: Access the configured route with the desired user ID to log in.
Example:
If you configure the route as login
then you can log in as user with ID 123
by visiting http://your-app.com/login/123
.
Benefits:
- Accelerated Development: Save time and effort by eliminating repetitive logins.
- Enhanced Testing: Quickly test different user scenarios without manual logins.
- Simplified Debugging: Easily access various user accounts for debugging purposes.
Installation:
-
Require the package:
composer require --dev fahadyousafmahar/slash-login
-
Publish the configuration:
php artisan vendor:publish --tag="slash-login-config"
-
Configure as needed: Edit the
config/slash-login.php
file to customize the login behavior.- route: The route segment for login (default: login).
- model: The User model class to fetch user data.
- redirect_route: The route to redirect to after login.
- guard: The authentication guard to use (default: web).
- custom_session_data: Additional session data to set after login.
- Note:
This package is intended for development and testing environments only. It automatically disables itself in production environments based on the
APP_ENV
configuration.
Keywords: Laravel, development, testing, login, authentication, efficiency, productivity, developer tool.
Author: Fahad Yousaf Mahar
Contributors: