Tim Oxendale
Forum Replies Created
-
Yeah, I’ll swap that!
I had thought I had already done it, someone asked a while ago but clearly I didn’t get to changing it.
Hello and thanks for reaching out, the plugin doesn’t send any emails. It’s most likely something else you have set up on your site that’s triggering the email when a user is registered.
Forum: Reviews
In reply to: [Tim's Nextcloud SSO OAuth2] Works like a charm!Glad you like it! Don’t worry I’m happy with the nice review.
Forum: Plugins
In reply to: [Tim's Nextcloud SSO OAuth2] nc-sso-error=unexpectedHey, not sure what else to suggest. it’s got to be a problem with Nextcloud or the dependencies it needs. Maybe head over to the Nextcloud forum and post about not being able to access the OCS API and see if you get any further joy there.
Forum: Plugins
In reply to: [Tim's Nextcloud SSO OAuth2] nc-sso-error=unexpectedHey, looking at your log they already are disabled, the plugin will work with enabled/disabled Pretty Links, you just need to alter the Nextcloud URL in the settings. If Pretty Links are disabled you just need to add /index.php/ to the end of the Nextcloud URL.
The test connection button will flag if it’s not right.
Forum: Plugins
In reply to: [Tim's Nextcloud SSO OAuth2] nc-sso-error=unexpectedHey, it’s going to be a problem with Nextcloud, I have set up a fresh install of version 24.0.2 in a subfolder with Pretty Links disabled and it worked as expected.
When searching the 997 error in Nextcloud it always just seems to be some kind of Nextcloud install issue, are you able to try and reinstall Nextcloud?
Forum: Plugins
In reply to: [Tim's Nextcloud SSO OAuth2] nc-sso-error=unexpectedHey, I have to say I’m not to sure…
On step 3 on the settings page, when you click test connection, does that come back ok?
Do you have any two-factor authentication on for the account in Nextcloud?
Forum: Plugins
In reply to: [Tim's Nextcloud SSO OAuth2] nc-sso-error=unexpectedHey, thanks for the info, what version of Nextcloud are you using? When the plugin is trying to retrieve the user details it’s getting a 997 error from Nextcloud (current user is not logged in).
Can you check on your Nextcloud server that Apache mod_headers, mod_rewrite and mod_env are enabled?
Forum: Plugins
In reply to: [Tim's Nextcloud SSO OAuth2] Return to same page after loginHey, just a follow-up. Version 2.0.0 will manage all of this for you now!
Forum: Plugins
In reply to: [Tim's Nextcloud SSO OAuth2] Return to same page after loginHey, sorry for the slow reply, if you’re doing it that way you would need to add the redirect URL to the login link, e.g. https://site.xxxx.net/wp-login.php?nc-sso=redirect&redirect_to=ULR_to_go_back_to
Forum: Plugins
In reply to: [Tim's Nextcloud SSO OAuth2] Return to same page after loginHey, make sure you are on version 1.9 or later (I have added some new filter hooks in this version). Then if you add the following into your theme functions.php file, that should do it!
add_filter('tims_nso_nextcloud_login_button_url', 'add_redirect_to_query_string'); function add_redirect_to_query_string($login_button_url){ if(get_the_ID()){ $login_button_url = $login_button_url.'&redirect_to='.urlencode(esc_url_raw(get_permalink(get_the_ID()))); } return $login_button_url; } add_filter('tims_nso_authorize_url', 'add_redirect_to_query_string_to_session'); function add_redirect_to_query_string_to_session($authorize_url){ if(session_status() === PHP_SESSION_NONE) { session_start(); } if(isset($_GET['redirect_to'])){ $_SESSION['original_page'] = esc_url_raw(urldecode($_GET['redirect_to'])); } return $authorize_url; } add_filter('tims_nso_successful_login_redirect', 'redirect_user_back_to_original_page'); function redirect_user_back_to_original_page($redirect_url){ if(session_status() === PHP_SESSION_NONE) { session_start(); } if(isset($_SESSION['original_page']) && filter_var($_SESSION['original_page'], FILTER_VALIDATE_URL)){ $redirect_url = esc_url_raw($_SESSION['original_page']); } return $redirect_url; }so the first filter gets the page URL from the page ID and adds it to the Nextcloud login button redirect_to=…
the second checks the redirect_to=… parameter and adds it to the session just before the user goes off to Nextcloud.
Then the final one checks the session for the redirect and sets the redirect URL to that page.
Forum: Plugins
In reply to: [Tim's Nextcloud SSO OAuth2] Security Warning Every LoginHello, that message is all Nextcloud sadly, I’m not aware of any way you can change or bypass it. It might be worth heading over to Nextcloud and adding it to the feature request list.
Sorry I couldn’t be of more help.
Forum: Plugins
In reply to: [Tim's Nextcloud SSO OAuth2] nc-sso-error=returned-invalidGlad it’s working!
Thanks
Forum: Plugins
In reply to: [Tim's Nextcloud SSO OAuth2] nc-sso-error=returned-invalidThat’s disappointing, I have really no idea what’s going wrong then. Would it be possible to get an admin login to one of the WordPress sites? You can email it to me directly at [email protected]
Forum: Plugins
In reply to: [Tim's Nextcloud SSO OAuth2] nc-sso-error=returned-invalidIf you update again and go to the settings you can now change the new “Temp Key Storage Type” from Session to Cookie and that will bypass the PHP session completely which must be being removed when you swap between sites.