承接 dorukyy/loginx 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

dorukyy/loginx

Composer 安装命令:

composer require dorukyy/loginx

包简介

A new authentication system for Laravel

README 文档

README

GitHub last commit GitHub Release Packagist Downloads GitHub issues GitHub pull requests

Laravel PHP GitHub

packagist: dorukyy/loginx

Introduction

This is a simple login system that uses a database to store user information for laravel. Everything needed for a login system is included in this package. You can use this package to create an Authentication system for your project. This package is not suitable for use in large projects. It is a simple package that can be used in small projects. If you want to use it in a large project, you can develop it further.

Requirements

  • Laravel 8.x
  • PHP 7.3 or higher

Installation

You can install the package via composer:

composer require dorukyy/loginx:dev-main

The package will automatically register itself.

Features

  • Login /w Email, Username or Phone
  • Register
  • Ip Blocking
  • Timeout when failed attempts
  • Auto-block IP address after trying to access different accounts
  • Password requirements
  • User blockable
  • User referral system
  • Recaptcha
  • User roles
  • User permissions

Configuration

You can change the configuration of the package by publishing the configuration file.

php artisan vendor:publish --provider="dorukyy\loginx\LoginxServiceProvider"

Add traits to your User model.

use dorukyy\loginx\Traits\LoginxUser;
use dorukyy\loginx\Models\LoginxUser as LoginxUserModel;


class User extends Authenticatable
{
    use LoginxReferral,Loginx,LoginxApiKey;

}

run the following command

php artisan loginx:setup

Almost everything in the package can be editable from database. You can change the configuration of the package by changing the values in the configuration file.

Usage

Variables

  • "AUTO_BLOCK_IP_DURATION_MIN" : The duration of the IP block in minutes.
  • "AUTO_BLOCK_IP_WHEN_FAILED_LOGINS_DIFFERENT_ACCOUNT" : If the user tries to log in with different accounts, loginx will block the IP Address.
  • "AUTO_BLOCK_IP_WHEN_FAILED_LOGINS_DIFFERENT_ACCOUNT_COUNT" : The number of different accounts that the user can try to log in with.
  • "AUTO_BLOCK_IP_WHEN_FAILED_LOGINS_DIFFERENT_ACCOUNT_IN_SECS" : The duration of trying to log in with different accounts in seconds.
  • "CHECK_IP_BLOCK" : If the IP block is enabled.
  • "IS_USERS_BLOCKABLE" : If the user is blockable.
  • "LOGIN_WITH_EMAIL" : If the user can log in with email.
  • "LOGIN_WITH_USERNAME" : If the user can log in with username.
  • "LOGIN_WITH_PHONE" : If the user can log in with phone.
  • "PASSWORD_MAX_LEN" : The maximum length of the password.
  • "PASSWORD_MIN_LEN" : The minimum length of the password.
  • "PASSWORD_REQ_NUMBER" : If the password requires a number.
  • "PASSWORD_REQ_SPECIAL" : If the password requires a special character.
  • "PASSWORD_REQ_UPPER_CASE" : If the password requires an uppercase letter.
  • "TIMEOUT_AFTER_X_TRY" : The number of failed login attempts before the timeout.
  • "TIMEOUT_IN_X_SECS" : The duration within which the user can fail to log in x times.
  • "TIMEOUT_DURATION" : The duration of the timeout in seconds. // Default 900 = 5 minutes

Disclaimer

This package is not suitable for use in large projects. It is a simple package that can be used in small projects. If you want to use it in a large project, you can develop it further. Also using this package requires table and model changes. Using this package will overwrite your User model and create a new table. If you want to use this package, you should be aware of these changes.

Contributing

If you have any ideas or suggestions to improve the package, please let me know. Feel free to contribute to the package.

统计信息

  • 总下载量: 23
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-08-02