1
Addons / [Addon] SSO/Social Login - Google/Facebook
Last post by vbgamer45 -Author: vbgamer45
Website: https://www.elkartemods.com/
Compatible with: ElkArte 1.1.0 - 1.1.99
Live on https://www.elkartemods.com/ with Google to use!
Download Link: https://www.elkartemods.com/index.php?topic=65.0
================================================================================
DESCRIPTION
================================================================================
SSO / Social Login adds OAuth 2.0 social login support to ElkArte. Users can
sign in or register with one click using their Google or Facebook account.
Buttons appear on the login and registration pages automatically.
Features:
- Sign in with Google
- Sign in with Facebook
- Auto-links existing accounts by matching email address
- Optional auto-registration for new users
- Extensible provider architecture (add new providers easily)
- Admin panel for managing settings and provider credentials
- Profile page showing linked SSO accounts with unlink option
- CSRF-protected OAuth flow with server-side token exchange
- Styled login buttons with official provider branding
================================================================================
REQUIREMENTS
================================================================================
- ElkArte 1.1.x
- PHP 7.0 or higher
- PHP cURL extension enabled
- SSL/HTTPS recommended (required by most OAuth providers)
================================================================================
INSTALLATION
================================================================================
1. Download the package zip file
2. Go to Admin > Packages > Install a New Package
3. Upload and install the package
4. Navigate to Admin > Configuration > SSO / Social Login
5. Enable SSO and configure at least one provider (see below)
================================================================================
CONFIGURATION
================================================================================
After installation, go to Admin > Configuration > SSO / Social Login.
SETTINGS TAB:
- Enable SSO / Social Login: Master on/off switch
- Auto-register new users: When enabled, users signing in via SSO who don't
have a matching forum account will have one created automatically
PROVIDERS TAB:
Configure each OAuth provider with credentials from their developer console.
Step-by-step setup instructions are shown for each provider.
Google Setup:
1. Go to https://console.cloud.google.com/apis/credentials
2. Create a project and OAuth 2.0 Client ID (Web application type)
3. Add the Redirect URI shown in the admin panel to Authorized redirect URIs
4. Copy the Client ID and Client Secret into the admin panel
5. Configure the OAuth consent screen with your forum name
Facebook Setup:
1. Go to https://developers.facebook.com/apps/
2. Create an app (Consumer or Business type)
3. Find App ID and App Secret under Settings > Basic
4. Go to Facebook Login > Settings
5. Add the Redirect URI shown in the admin panel to Valid OAuth Redirect URIs
6. Copy the App ID and App Secret into the admin panel
7. Set the app to Live mode for production use
================================================================================
HOW IT WORKS
================================================================================
1. User clicks "Sign in with Google" (or Facebook) on the login page
2. User is redirected to the provider's consent screen
3. After authorization, the provider redirects back to your forum
4. The mod checks for a matching account:
a. If the SSO identity is already linked -> logs in
b. If the email matches an existing member -> links and logs in
c. If no match and auto-register is on -> creates account and logs in
d. If no match and auto-register is off -> shows error with instructions
Users can view and unlink their SSO accounts from their profile.