PHP and WordPress Single Sign On (SSO) with optional JWT Addon
- Edited
Hello, can I use your extension at freeflarum also? If so can you explain example setup? This is what I fill so far in extension setup:
Registration URL: https://example.com/wp-login.php?action=register
Login URL: https://example.com/wp-login.php?redirect_to=forum
Logout URL: https://example.com/wp-login.php?action=logout
Account URL: ???
As for JWT part I have no idea how to fill issuer domain and signer key.
aaronlbpeterman yes you should be able to setup the extension on FreeFlarum if it is installed. You can read the docs to know how to continue to setup it
tharuka it seems there is a new fix for your issue that will be available in the next update: https://tracker.maicol07.it/issue/FSSOE-19
- Edited
[Community requested] PHP Version Drop Poll
So I need the help of the community to decide if you want a PHP version drop and which version. So here is a poll. Click the option you would like to be the minimum PHP version required by the extension (and maybe also the plugins, check the other poll below).
Obviously, the upgrade to a newer PHP version will include all the new features, where possible.
Polls are in the next post!
Ok, so there was indeed an issue with the previous polls (a user can vote infinite times). So here is another one I hope they work correctly...
Please answer this even if you have answered to the one above.
Poll #1 - Flarum extension PHP Version Change/Bump?
https://doodle.com/poll/h7fwni2k44fkt79d
Poll #2 - Plugins PHP Version bump to the winner one?
https://packagist.org/packages/maicol07/flarum-ext-sso/php-stats <- this might be more reliable to determine which PHP version people are using.
maicol07 It was added recently: https://blog.packagist.com/sunsetting-the-php-version-stats-blog-series/
- Edited
PHP 7.3 and future versions support notice
Since there is someone who uses PHP 7.3, this is the future plans for PHP dropping:
- First, I'll support PHP 7.3 (or any other version) until its EOL. Check it here
- Second, if Flarum core changes PHP version before the EOL, I'll update too the version accordingly to what they have chosen.
This notice concerns both extensions and plugins.
Now, let's dive into the new release:
1.10.1 - Flarum extension
Released on June 12, 2021
Performance Improvements
b74c90c
Use dot notation to set array value
Bug Fixes
Docs changes
5e84bf4
Fixed PHPDocs
Building scripts changes
8f3d699
Allow to run changelog action manually to set the next version5cb1154
Add git credentialsa10765e
Add missing commitc009c2e
Add missing token to push back changes8ab1c6f
Push CHANGELOG.md back to repob705c4f
Ensure changelog is saved to fileec11208
Fix changelog action branch801fc90
Missing checkout action
Other changes
Hi @maicol07, once again, thank you very much for the SSO solution!
One question/suggestion, when I use the SSO extension settings in Flarum administration, I disable login/signup links.
However, when user is not logged in, I still have the big button "start a discussion" and when user clicks on it, it opens the login/signup popup window, not considering the SSO configuration > disable login/signup links.
Would be great if flarum would consider the SSO settings.
- Edited
lubos-h I thought this was fixed with this PR: maicol07/flarum-ext-sso7
However, I'll check this. Maybe Flarum changed something I didn't know about...
- Edited
Hi! I recently updated to Flarum 1.0.2 and noticed 2 problems with the plugin.
WP Plugin: v2.2
SSO Flarum v1.10
Fatal error when changing admin account info
When I want to change the admin nickname or profile picture, I get the following error log:
Got error 'PHP message: PHP Fatal error: Uncaught GuzzleHttp\\Exception\\ClientException: Client error: 'PATCH https://forum-website.com/api/users/3' resulted in a '403 Forbidden' response:
{"errors":[{"status":"403","code":"permission_denied"}]}
in /home/[redacted]/webapps/[redacted]/wp-content/plugins/sso-flarum/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
Stack trace:
#0 /home/[redacted]/webapps/[redacted]/wp-content/plugins/sso-flarum/vendor/guzzlehttp/guzzle/src/Middleware.php(69): GuzzleHttp\\Exception\\RequestException::create()
#1 /home/[redacted]/webapps/[redacted]/wp-content/plugins/sso-flarum/vendor/guzzlehttp/promises/src/Promise.php(204): GuzzleHttp\\Middleware::GuzzleHttp\\{closure}()
#2 /home/[redacted]/webapps/[redacted]/wp-content/plugins/sso-flarum/vendor/guzzlehttp/promises/src/Promise.php(153): GuzzleHttp\\Promise\\Promise::callHandler()
#3 /home/[redacted]/webapps/[redacted]/wp-content/plugins/sso-flarum/vendor/guzzlehttp/promises/src/TaskQueue.php(48): GuzzleHttp\\Promise\\Promise::G...', referer: https://WP-website.com/wp-admin/profile.php?wp_http_referer=%2Fwp-admin%2Fusers.php
️ Changing the nickname or profile picture of a normal user account does work.
User profile image not updated in Flarum
The user profile picture does not get updated in Flarum, but what does work is by putting the profile avatar code outside the 'if' check.
sso-flarum.php
line 261
$flarum_user->attributes->avatarUrl = get_avatar_url( $user_id, array( 'size' => 100 ) );
/*
if ( get_option( 'flarum_sso_plugin_update_user_avatar' ) ) {
$flarum_user->attributes->avatarUrl = get_avatar_url( $user_id, array( 'size' => 100 ) );
}
*/
Any idea what could cause these issues?
Let me know if you have any questions, thanks!