定制 lakm/nopass 二次开发

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

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

lakm/nopass

Composer 安装命令:

composer require lakm/nopass

包简介

Provides passwordless authentication for your laravel projects.

README 文档

README

Overview | How it works | Verification link | OTP code | Usage examples | Changelog | Testing | Security | License

Passwords are no longer secure!

Laravel GitHub Actions Workflow Status Packagist Version Downloads GitHub License

Overview

"I'm so fed up with passwords! I have to reset them all the time."

"Oh no, my passwords were leaked. I bet it's my password manager's fault."

"Someone accessed my account—I think they guessed my weak password."

We've all encountered one of these issues at some point. As the internet has evolved, there are now websites for almost everything we need. Modern users often have more than five accounts online.

How many online accounts do you have? The answer is likely more than one—probably more than 10. So, how do you manage to remember the passwords for each of these accounts? Here are a few options you might consider:

  • Memorize them.
  • Use a password manager.
  • Reset your password every time you forget it. 😂

We can easily rule out the first option since most of us aren't blessed with a superhuman memory. While password managers are a popular choice, their security isn't foolproof—data breaches and password leaks happen far too often, making them a less-than-reliable option.

That is the users' side of story. It's our responsibility to provide more convenience authentication methods for our users and improve user experiences. That is what this package made for.

!Note The package doesn't provide any authentication method. Instead, it provides two methods to use in your existing auth system. You can use any authentication like breeze, jetstream or custom one. Sample implementation has been provided in demo project

How it works

The package offers two methods for verification: sending a verification link to the user's email address or sending an OTP (One-Time Password) to the user's mobile number.

Verification link

Generate a link

    use LakM\NoPass\Facades\NoPass;
    
    $data = [];
    
    $link = NoPass::for($user)
        ->email()
        ->routeName('login-link')
        ->generate($data); // Data are attached to query string

OTP Code

Generate a OTP code

    use LakM\NoPass\Facades\NoPass;
    
    $link = NoPass::for($user)
        ->otp()
        ->generate();

Check validity

Check Email

    use LakM\NoPass\Facades\NoPass;
    
    $isValid = NoPass::for($user)
            ->isValid();

Check OTP

    use LakM\NoPass\Facades\NoPass;
    
    $isValid = NoPass::for($user)
            ->isValid($otp);

Invalidate

    use LakM\NoPass\Facades\NoPass;
    
    $isValid = NoPass::for($user)
            ->inValidate();

Usage Examples

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

./vendor/bin/pest

Security

Please see here for our security policy.

License

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

lakm/nopass 适用场景与选型建议

lakm/nopass 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 15.67k 次下载、GitHub Stars 达 22, 最近一次更新时间为 2024 年 09 月 20 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「Authentication」 「email」 「auth」 「laravel」 「otp」 「Passwordless」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 lakm/nopass 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 lakm/nopass 我们能提供哪些服务?
定制开发 / 二次开发

基于 lakm/nopass 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-20