eunusctg/supabase-auth
Composer 安装命令:
composer require eunusctg/supabase-auth
包简介
Enhanced Supabase authentication integration for Flarum with social login, 2FA and profile synchronization
README 文档
README
A comprehensive Supabase authentication integration for Flarum with advanced social login capabilities, user role synchronization, enhanced security features, and a modern, visually stunning admin interface.
Features
Authentication Methods
- Email/Password Authentication: Standard authentication using Supabase's secure authentication system
- Social Login: Connect with multiple providers:
- GitHub
- Discord
- Apple
- Slack
- Spotify
- Twitch
Enhanced Security
- Two-Factor Authentication (2FA): Additional security layer using authenticator apps
- Sensitive Operation Protection: Require 2FA verification for critical user actions
- Role-Based 2FA Enforcement: Configurable policies for requiring 2FA for specific user groups
User Synchronization
- Profile Sync: Keep user profiles in sync between Flarum and Supabase
- Avatar Sync: Automatic synchronization of user avatars
- Metadata Management: Synchronize and store additional user metadata from Supabase
Admin Features
- Comprehensive Dashboard: Visually appealing interface for managing Supabase integration
- Connection Testing: Test your Supabase credentials directly from the admin panel
- Provider Selection: Choose which social login providers to enable
- Advanced Settings: Fine-tune synchronization and security settings
Advanced Social Login Customization
- Multiple Display Modes: Choose between buttons, icons, or dropdown menu for social login
- Visual Customization: Customize colors, icons, gradients, and animations for each provider
- Priority Ordering: Set display order for social login providers
- Per-Provider Settings: Customize display name, visibility, and appearance for each provider
- Live Preview: See how social login buttons will appear to users in real-time
Installation
composer require eunusctg/supabase-auth
Configuration
Supabase Setup
- Create a Supabase account at supabase.com
- Create a new project
- Navigate to Authentication settings
- Enable the authentication providers you want to use
- Configure redirect URLs for each provider (your-forum-url/supabase/callback)
- Obtain your API keys (public anon key and service role key)
Flarum Setup
- Navigate to your Flarum admin panel
- Go to Extensions → Supabase Authentication
- Enter your Supabase project URL and API keys
- Configure desired social login providers
- Customize the appearance of social login buttons:
- Select display mode (buttons, icons, or dropdown)
- Customize colors, gradients, and animations
- Set display priority for providers
- Customize individual provider settings (names, icons, visibility)
- Set up security settings (2FA, etc.)
- Save settings
User Guide
Social Login
Users can log in using any of the enabled social providers by clicking the corresponding button, icon, or dropdown option in the login modal. The appearance and behavior of these social login options can be fully customized by the administrator.
Two-Factor Authentication
- Navigate to user settings
- Find the Two-Factor Authentication section
- Click "Set Up 2FA"
- Scan the QR code with your authenticator app
- Enter the verification code
- 2FA is now active for your account
Managing Connected Accounts
- Navigate to user settings
- View all connected social accounts
- Disconnect any unwanted connections
Developer Documentation
Extension Architecture
The extension follows a modern architecture with:
- Frontend components using Mithril.js
- Backend controllers and services using PHP
- Secure API communication with Supabase
Extending the Extension
The extension is designed to be extendable through Flarum's extension system. You can:
- Add custom social login providers
- Extend user synchronization behavior
- Add custom security policies
Troubleshooting
Common Issues
- Connection Errors: Verify your Supabase credentials and check that your project is running
- Social Login Failures: Ensure redirect URLs are correctly configured in Supabase
- 2FA Issues: Verify that server time is synchronized correctly
Getting Help
If you encounter any issues, please:
- Check the GitHub Issues page
- Create a new issue with detailed information if yours isn't already reported
License
This extension is licensed under the MIT License. See the LICENSE file for details.
Credits
Developed by the ForumEZ Team.
eunusctg/supabase-auth 适用场景与选型建议
eunusctg/supabase-auth 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 7 次下载、GitHub Stars 达 5, 最近一次更新时间为 2025 年 04 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「Authentication」 「oauth」 「2fa」 「social-login」 「flarum」 「two-factor-authentication」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 eunusctg/supabase-auth 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 eunusctg/supabase-auth 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 eunusctg/supabase-auth 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
WeChat OAuth SDK
Laravel Authentication package with built-in two-factor (Authy) and social authentication (Socialite).
This package provides Laravel bindings and a Eloquent/Model trait for pragmarx/recovery package.
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
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-15