nerdcel/kirby-oauth2-email 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

nerdcel/kirby-oauth2-email

最新稳定版本:v0.4.2

Composer 安装命令:

composer require nerdcel/kirby-oauth2-email

包简介

Kirby Plugin to setup OAuth for SMTP Mail (e.g. Outlook, Gmail, Yahoo, etc.)

README 文档

README

Kirby 5+ Release License

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:

  • Google
  • 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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-01-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固