dreitier/streamline-authentication
Composer 安装命令:
composer require dreitier/streamline-authentication
包简介
Common authentication methods for multi-tenant Laravel apps
README 文档
README
Common authentication methods for multi-tenant Laravel apps.
Features
- Provide common authentication methods
- Form-based logins with principal (e.g. username, email) and password
- Password-less logins by sending emails with a magic login link
- Logins by selecting pre-defined users for demo/e2e environments
- Socialite integration for OAuth
- Targeted for developers of multi-tenant Laravel SaaS/on-premises applications
- Activation of different authentication methods for only specific groups of customers
- Configurable authentication methods per tenant
- Users can log in through different Socialite drivers in the same tenant
When to go with Streamline Authentication instead of Laravel Fortify?
For the most Laravel applications, Fortify implements all required authentication workflows in a much easier and Laravel-esk way. If you need password-based authentication with optional 2FA enabled, and a registration and password recovery workflow you should go probably go with Fortify. If you need a more configurable and dynamic way of enabling and configuring different authentication methods throughout different tenants, Streamline Authentication might be an option for you.
Installation
Install the composer package and publish the required configuration:
composer require dreitier/streamline-authentication php artisan vendor:publish --provider=Dreitier\\Streamline\\Authentication\\StreamlineAuthenticationServiceProvider --tag=config
Custom views
If you want to customize the views and mails, publish the assets with
php artisan vendor:publish --provider=Dreitier\\Streamline\\Authentication\\StreamlineAuthenticationServiceProvider --tag=assets
You find the customized assets below resources/views/vendor/streamline-authentication.
Custom routes
By default, Streamline Authentication registers the authentication method flows at the /sign-in endpoint. Only enabled authentication methods are registered.
If you want to publish the routes by yourself, use
php artisan vendor:publish --provider=Dreitier\\Streamline\\Authentication\\StreamlineAuthenticationServiceProvider --tag=routes
and set in config/streamline-authentication.php:
return [ // ... 'routes' => false // ... ];
Configuration
config/streamline-authentication.php contains annotated configuration options.
Terminology
| Term | Description |
|---|---|
| Authentication method | Like form-based authentication, Socialite etc. |
| Authentication provider | Provides the configuration for an authentication method of a given backend |
FAQ
dreitier/streamline-authentication 适用场景与选型建议
dreitier/streamline-authentication 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 111 次下载、GitHub Stars 达 2, 最近一次更新时间为 2022 年 11 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「Authentication」 「oauth」 「SSO」 「laravel」 「multitenant」 「socialite」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 dreitier/streamline-authentication 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dreitier/streamline-authentication 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 dreitier/streamline-authentication 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
WeChat OAuth SDK
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.
Ory-Hydra OAuth 2.0 Client Provider for The PHP League OAuth2-Client
Library for ORCID web services
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.
统计信息
- 总下载量: 111
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-11-03