nerdcel/kirby-oauth2-email
Composer 安装命令:
composer require nerdcel/kirby-oauth2-email
包简介
Kirby Plugin to setup OAuth for SMTP Mail (e.g. Outlook, Gmail, Yahoo, etc.)
README 文档
README
This plugin is a Kirby extension that allows you to authenticate users via OAuth2 and their email address.
This plugin implements the OAuth2 flow for the following providers:
- Microsoft
- Yahoo
- Azure
Installation
composer require nerdcel/kirby-oauth2-email
Or download the latest release unzip it, copy it to site/plugins/kirby-oauth2-email.
Setup your OAuth2 provider
You need to configure your OAuth2 provider to allow the authentication of your users. You need to create an OAuth2 application and get the client ID and client secret. At this point, I assume you have a basic understanding of OAuth2 and how to setup your provider.
You most likely need to provide a redirect URL, which is https://your-site.tld/callback-path.
If this step is done, you can configure the plugin using the refresh token, client ID, and client secret (tenantId e.g. Azure).
Once this is done you can configure the plugin.
Usage
Edit your config.php and add the following lines:
'nerdcel.kirby-oauth2-email' => [ 'callback-path' => 'callback-path', // default: 'email/oauth2' 'enabled' => true, // default: false 'email' => 'example@your-provider.tdl', 'service' => 'azure', // google, microsoft, yahoo, azure 'client-id' => 'your-client-id', 'client-secret' => 'your-client-secret', 'tenant-id' => 'your-tenant-id', // only for azure 'refresh-token' => 'your-refresh-token', // received from the first login ]
RefreshToken renewal
The plugin will automatically renew the refresh token when an email is sent. The new refresh token will be written to .oauth file in the root of your Kirby installation. Make sure that the web server has write access to this file.
After you have configured the plugin, you should be able to send emails for example using the dreamform plugin or when you use the 2FA option for the panel.
Usefull links
nerdcel/kirby-oauth2-email 适用场景与选型建议
nerdcel/kirby-oauth2-email 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 243 次下载、GitHub Stars 达 3, 最近一次更新时间为 2025 年 01 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 nerdcel/kirby-oauth2-email 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 nerdcel/kirby-oauth2-email 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 243
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 28
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-01-29