forumez / supabase-auth
Enhanced Supabase authentication integration for Flarum with social login, 2FA and profile synchronization
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Language:JavaScript
Type:flarum-extension
Requires
- bacon/bacon-qr-code: ^3.0
- flarum/core: ^1.0.0
- guzzlehttp/guzzle: ^7.0
- psr/http-client: ^1.0
- spomky-labs/otphp: ^11.3
Suggests
- flarum/akismet: Block spam registrations from Supabase social logins
- flarum/approval: Require moderation for Supabase registrations
- flarum/nicknames: Allow users to set nicknames independent of their Supabase display names
This package is auto-updated.
Last update: 2025-04-17 03:21:58 UTC
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.