This extension enables users to login with an OpenID Connect (OIDC) provider. This method can be set to the only allowed method to login (SSO mode) or used as a complementary login method (like OAuth providers)
This is a Premium extension, not a free one. You can buy a license to use it in your Flarum through Extiverse
Mostly for three reasons:
- You can connect to any auth system, written in any language, as long as they are compliant with the OpenID Connect specs. My other SSO extension, which is free, allows you to connect to any auth system written in PHP.
- It requires only configuration in the admin panel and zero code. The SSO extension requires integration with your auth system through plugins in addition to extension configuration.
- If you want to use your auth system for other services/apps, OIDC is more reliable than my other SSO extension, since it adopts to an SSO standard other apps use.
Button in login modal:
Buttons in user settings (non-SSO mode):
- PHP 8.0+ (starting from v2.0)
- The following PHP extensions installed and enabled:
The extension relies on
maicol07/oidc-client-php, a heavenly modified fork of
JuliusPC/OpenID-Connect-PHP. You can see a list of OIDC drafts and documents that have been implemented. However, the following features aren’t already implemented in the extension at the time of writing (v1.0) and they can’t be set/used:
The extension uses the authorization code flow variant of OpenID Connect. I suggest checking these resources to learn more about OIDC flow here:
¶ Will it work on WordPress and other CMS?
Yes, as long as you’re using a plugin that provides OpenID Connect features. For WordPress, you can try this one (not tested): https://wordpress.org/plugins/miniorange-oauth-20-server/
¶ Do you want to disable standard signup and login?
Use this extension: Third Party Login Only
This way, you can only login/signup through OIDC.
Don’t enable the “Replace Sign In and Sign Up button with FoF Passport login (oAuth)” option in the Third Party Login Only since it doesn’t work with this extension. Instead, you can achieve the same result with the “SSO Mode” (see Configuration below)
- Be sure to check Extiverse instructions in your subscriptions page on how to install a premium extension via composer.json
- Install by executing the command below and activate the extension in Flarum Administration area.
composer require maicol07/flarum-oidc-client:*
PHP versions will be supported until its EOL.
If Flarum core changes PHP version before the official EOL, I’ll update too the version accordingly to what they have chosen.
Upgrade by executing the command below, like with every other extension.
composer update maicol07/flarum-oidc-client:*
Here is the explanation of all the extension settings:
- OpenID Connect provider name: The name of your OpenID Connect provider. This will be shown on buttons in the login/signup modal and user settings.
- Client ID: The client ID your provider assigned you.
- Client secret: A secret key your provider assigned you when you have registered the client (Flarum).
- Provider URL: The provider URL. This is only used to autodiscover the provider endpoints.
You don’t have to fill these endpoints if your provider supports endpoints autodiscovery and you have filled the provider URL setting above
- Authorization endpoint: URL where the extension will get the authorization code, needed to get the access token from the token endpoint
- Token URL: URL where the extension will get the access token, needed to get the access token from the userinfo endpoint
- Userinfo URL: URL where the extension will get the user infos, needed to get the access token from the token endpoint
- End session (logout) URL: URL where the extension will send the logout action to end user session in the provider
- Issuer URL: URL of the response payload issuer. This often matches the provider URL.
- Deactivate the nonce verify: Allow to skip the nonce verification. Can be useful if provider doesn’t support it.
- Linker claim: Claim that helps matching Flarum users with provider users. If you don’t know what to digit, fill it with
- Account management URL: URL where the user will be redirected whenthe Manage Account button is clicked. This button shows up in the user settings only if this setting has a valid URL.
- Open account management in a new tab: Open the link of the Manage Account button in a new tab
- SSO mode: Bypass Flarum login/signup modal and redirect the user directly to the provider auth page. This also make OIDC the only option to login to Flarum.
- Logout from provider (when SSO mode is enabled): Logout from OIDC provider when logging out from Flarum. This option will work only when SSO mode is enabled.
- Remove signup button: Removes the signup button from Flarum frontend
- Sync user avatar: Sync user avatars with the ones saved in the OIDC provider
Since this is a premium extension, you also have premium support. So I’ll help you in every error you’re facing. You can contact me using the following services:
Major changes are marked with
- The internal OpenID Connect Client, which you can find here, has got a major refactor. Due to this big change, the minimum PHP version has been bumped to PHP 8.0
- This will improve the overall performance of the extensions, powered by new PHP 8 features!
- fix: 🐛 Fixed exception when not inserting provider URL
The issue was caused by a check via autodiscovery about PKCE methods
- Added more metadata to composer.json
- Updated README (also on Extiverse)