承接 xrh0905/oauth-microsoft 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

xrh0905/oauth-microsoft

Composer 安装命令:

composer require xrh0905/oauth-microsoft

包简介

Log in to your Flarum forum with Microsoft

README 文档

README

License Latest Stable Version Total Downloads

Log in to your Flarum forum with Microsoft. An addon for FoF OAuth.

Supports personal Microsoft accounts (Outlook, Hotmail, Live) as well as work and school accounts via Microsoft Entra ID (Azure Active Directory).

See also: https://learn.microsoft.com/zh-cn/entra/identity-platform/v2-protocols-oidc

Installation

Install with composer:

composer require xrh0905/oauth-microsoft
php flarum cache:clear

Updating

composer update xrh0905/oauth-microsoft
php flarum cache:clear

Setup

1. Register an Application in the Azure Portal

  1. Sign in to the Azure Portal.
  2. Navigate to Microsoft Entra IDApp registrationsNew registration.
  3. Fill in the form:
    • Name: anything descriptive, e.g. My Flarum Forum.
    • Supported account types: choose who can sign in (see Choosing a Tenant below).
    • Redirect URI: choose Web as the platform, then paste the callback URL shown in this extension's settings page in your Flarum Admin panel (it looks like https://your-forum.com/auth/microsoft).
  4. Click Register.

2. Obtain the Client ID and Client Secret

  1. On the application's Overview page, copy the Application (client) ID — this is your Client ID.
  2. Go to Certificates & secretsNew client secret.
  3. Enter a description and choose an expiry, then click Add.
  4. Copy the Value immediately (it is only shown once) — this is your Client Secret.

3. Configure the permissions

  1. On application's AuthenicationSettings page, make sure to tick ID tokens (used for implicit and hybrid flows) checkbox.
  2. On application's API Permissions page, grant openid profile email under Graph API in Delegated mode.

4. Configure the Extension

In your Flarum Admin panel, go to Extensions → Log In With Microsoft and enter the Client ID and Client Secret obtained above. If you want to restrict sign-in to a specific audience, also set the Tenant field (see below).

Choosing a Tenant

The Tenant field controls which Microsoft accounts are allowed to sign in. It needs to match the settings in Supported account types.

Value Who can sign in
(blank) / common Personal Microsoft accounts and work/school (Azure AD) accounts from any organisation
organizations Work/school (Azure AD) accounts from any organisation only
consumers Personal Microsoft accounts (Outlook, Hotmail, Live) only
A tenant ID (GUID) Only accounts from that specific Azure AD tenant, e.g. xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
A primary domain Only accounts from that Azure AD tenant, e.g. contoso.com

Tip: If your forum is for an organisation and you want to restrict sign-in to your company's Azure AD, set the tenant to your tenant ID or your primary domain. You can find your tenant ID on the Microsoft Entra ID → Overview page in the Azure Portal.

Note: If you set Supported account types to Single tenant in the Azure Portal, you must also set the Tenant field here to your tenant ID or domain, otherwise the authentication endpoint will reject requests.

Links

xrh0905/oauth-microsoft 适用场景与选型建议

xrh0905/oauth-microsoft 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 730 次下载、GitHub Stars 达 3, 最近一次更新时间为 2023 年 05 月 27 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 xrh0905/oauth-microsoft 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-27