承接 fof/oauth 相关项目开发

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

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

fof/oauth

Composer 安装命令:

composer require fof/oauth

包简介

Allow users to log in with GitHub, Facebook, Google, Discord, GitLab, LinkedIn, and more!

README 文档

README

License Latest Stable Version Total Downloads OpenCollective

A Flarum extension. Allow users to log in and register using OAuth 2.0 providers. Supports account linking, automatic email-match linking, and a security-settings page where users can manage their connected providers.

Bundled providers

By default these providers are included:

  • Discord
  • Facebook
  • GitHub
  • GitLab
  • Google
  • LinkedIn

Features

  • Login & registration via any enabled OAuth 2.0 provider
  • Account linking — authenticated users can connect a provider from their security settings page
  • Email-match auto-link — if a provider returns an email address that matches an existing account, the provider is linked automatically and the user is logged in
  • Account linked confirmation — a modal is shown the first time a provider is linked, confirming the connection
  • PKCE support — providers that support Proof Key for Code Exchange can opt in per-provider
  • Group assignment — automatically assign users to a forum group when they register via a specific provider
  • Admin moderation — view and manage users' linked provider accounts from the admin panel

Permissions

This extension provides the ability to view the status of linked OAuth providers (intended for admin and/or moderator use). In order for this to function correctly, you must also set the permission Moderate Access Tokens to at least the same group as you require for Moderate user's linked accounts.

Group Assignment

You can configure each OAuth provider to automatically assign users to a specific group when they register. This is useful for tracking which provider users signed up with or for granting specific permissions based on the authentication method.

To configure group assignment:

  1. Go to the extension settings
  2. Enable the desired OAuth provider
  3. Click the settings icon for that provider
  4. Select a group from the "Assign Group" dropdown
  5. Save your changes

Users who register through that provider will automatically be assigned to the selected group.

Additional providers

Additional OAuth providers are available for this extension. Here's a handy list of known extensions:

If you know of others, please open a PR to add them to this list.

Screenshots

Default provider settings example provider setup example

Login/signup example with Github, Twitter, Twitch and Google enabled. example login

Installation

composer require fof/oauth

Updating

composer update fof/oauth
php flarum cache:clear

Configuration

Translation

You can replace the text for the forum sign in buttons in two ways:

  • Use fof-oauth.forum.providers.<name> to replace the name of the provider on the forum side
  • Use fof-oauth.forum.log_in.with_<name>_button to replace the entire button "Log In with <name>" text

Extending

It is possible to add additional providers using an extender. See UPGRADE.md for a full guide, including a complete example provider class and notes on breaking changes between versions.

In short:

  • In your new extension, require fof/oauth as a dependency
  • Define a new Provider class which extends FoF\OAuth\Provider
  • From your new extension's extend.php, register the provider: (new FoF\OAuth\Extend\RegisterProvider(MyNewProvider::class))
  • Provide the required translations under the fof-oauth namespace (see UPGRADE.md for required keys)

Upgrading an existing provider extension to Flarum 2.x? See UPGRADE.md for the full list of breaking changes.

Links

OpenCollective

An extension by FriendsOfFlarum.

fof/oauth 适用场景与选型建议

fof/oauth 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 134.12k 次下载、GitHub Stars 达 50, 最近一次更新时间为 2020 年 09 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 134.12k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 51
  • 点击次数: 38
  • 依赖项目数: 45
  • 推荐数: 0

GitHub 信息

  • Stars: 50
  • Watchers: 5
  • Forks: 19
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-09-19