usermp/laravel-login
Composer 安装命令:
composer require usermp/laravel-login
包简介
Simple laravel login
关键字:
README 文档
README
This package provides a simple and secure login system for Laravel applications. It includes OTP verification and user authentication using Laravel Passport, with integration for Kavenegar for OTP sending and Sentry for error tracking.
Installation
To install the package, follow these steps:
-
Install the package via Composer:
composer require usermp/laravel-login:"dev-master" -
Add the required environment variables to your
.envfile:# Constants for OTP settings OTP_TOKEN_EXPIRE_SECONDS=180 OTP_TOKEN_NUM_DIGITS=6 # Kavenegar API settings KAVENEGAR_API_KEY="" KAVENEGAR_SENDER="" # Sentry configuration SENTRY_LARAVEL_DSN="" SENTRY_TRACES_SAMPLE_RATE=1.0
-
Add the
LoginServiceProviderclass to the providers array in yourconfig/app.phpfile:'providers' => [ // Other Service Providers Usermp\LaravelLogin\LoginServiceProvider::class, ],
-
Run the migrations to set up the necessary database tables:
php artisan migrate
-
Configure Laravel Passport:
php artisan passport:install
With these steps completed, your Laravel application is now equipped with a secure login system integrated with OTP verification.
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-01-15