定制 usermp/laravel-login 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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:

  1. Install the package via Composer:

    composer require usermp/laravel-login:"dev-master"
  2. Add the required environment variables to your .env file:

    # 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
  3. Add the LoginServiceProvider class to the providers array in your config/app.php file:

    'providers' => [
        // Other Service Providers
        Usermp\LaravelLogin\LoginServiceProvider::class,
    ],
  4. Run the migrations to set up the necessary database tables:

    php artisan migrate
  5. 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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-15