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!
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 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 lakm/nopass 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Laravel Multiauth package
Automatically logs-in users if they are already authenticated by a remote source. (e.g. environment variable REMOTE_USER)
GraphQL authentication for your headless Craft CMS applications.
A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.
Laravel middleware to restrict a site or specific routes using HTTP basic authentication
This package provides a flexible way to add Role-based Permissions to Laravel 6.x
统计信息
- 总下载量: 15.67k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 22
- 点击次数: 22
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-09-20