=== Tim's Nextcloud SSO OAuth2 === Contributors: @TimsSolutions Donate link: https://www.timoxendale.co.uk/donate Tags: login, OAuth 2.0, Single Sign-on, WordPress SSO, Nextcloud Requires at least: 5.9 Tested up to: 7.2 Stable tag: 2.3.0 Requires PHP: 8.0 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Enables you to log in to your WordPress site with your Nextcloud account with OAuth2 == Description == A simple OAuth2 plugin so you can log in to your WordPress site with your Nextcloud account. Add a Nextcloud login button to the WordPress login page, or anywhere with the login block or a shortcode, match Nextcloud groups to WordPress roles (and keep them in sync on every login), and choose where users go after logging in. Optional extras include Nextcloud profile pictures, keeping names and email addresses in sync, Nextcloud-only login, an hourly check that Nextcloud is online, and WP-CLI commands. If you use the External sites app in Nextcloud, set the URL to www.example.com/wp-login.php?nc-sso=redirect and users are logged in without clicking a button. The plugin has been tested with Nextcloud 20.0.14 to 35.0.3. If you have any problems please reach out on the support forum or directly [here](https://www.timoxendale.co.uk/plugins/wordpress-nextcloud-sso-oauth2/#support). Note this is not an official plugin from Nextcloud, it is just from someone that uses it with WordPress a lot. == Installation == 1. Install the plugin from the WordPress.org plugin directory, or upload the files to your server. 2. Activate it from the Plugins page. 3. Go to Settings -> Nextcloud OAuth2 and follow the steps. == Frequently Asked Questions == = How do I set the plugin up? = The settings page (Settings -> Nextcloud OAuth2) walks you through it: 1. Log in to Nextcloud as an administrator 2. Go to Administration settings -> Security (Settings -> Security in older versions of Nextcloud) 3. Under "OAuth 2.0 clients" add a new client 4. Use any name, and your site URL as the redirect URL 5. Copy the Client Identifier and Secret into the plugin settings 6. Click "Save and test with secret" A setup checklist at the top of the settings page shows what is left to do, and Test connection ticks off the steps it has checked. Once "Save and test with secret" works, steps 1 and 2 fold into one line saying which Nextcloud you are connected to, and the longer explanations move behind "More info" links. Click the line to open the steps again. = What is my Nextcloud URL? = The address of your Nextcloud, e.g. https://cloud.example.com/. Include any subfolder (https://example.com/cloud/), and include /index.php/ if your Nextcloud URLs have it (https://example.com/index.php/). = Where is the settings page? = Settings -> Nextcloud OAuth2, or click "Settings" under the plugin on the Plugins page. = How do I add a login button to a page? = In the block editor, add the "Nextcloud Login Button" block. You can change the text, alignment, colours, font size, padding and border, make it full width, and choose to bring people back to the same page after they log in. It is hidden from users who are already logged in, or you can show them a message instead. There is also a shortcode, [nextcloud_login class="btn"]button text[/nextcloud_login]. It also takes a style attribute, and is hidden from users who are already logged in. For just the URL, e.g. in a menu, use [nextcloud_login_link] or www.example.com/wp-login.php?nc-sso=redirect. The button on the WordPress login page has the CSS class tims-nso-login-button if you want to restyle it. = How are Nextcloud accounts matched to WordPress accounts? = Each WordPress account is linked to a Nextcloud user ID, which Nextcloud users cannot change. Accounts the plugin creates are linked automatically. Existing users link their account from their profile (Users -> Profile -> Link my Nextcloud account), or an administrator enters their Nextcloud user ID on the user edit screen. The Users list can show who is linked (Advanced options). Step 3 asks "How should their existing WordPress account be found?" for someone logging in with Nextcloud for the first time: * "Do not match, they link it from their profile" (recommended, and the default for new installs) - existing accounts are never matched. * "Match the account with the same email address" - an account with the same email address is linked. * "Match the account with the same username" - an account with the same username is linked. After that, every login uses the Nextcloud user ID. Only match by email address or username if you control every Nextcloud account. Existing administrators, editors, shop managers and other privileged accounts are never linked automatically, they link from their profile instead. New accounts are still created with the role from your settings, including administrator. The next question, "If they do not have a WordPress account yet", either creates a new account for them or does not let them log in. A summary under both questions shows what will happen on a first login. = I am updating from a version before 2.1.0, will my site keep working? = Yes, all your settings are kept, and your old matching setting is carried over: * "Email Address" becomes "Match the account with the same email address" * "Username" becomes "Match the account with the same username" Subscribers, customers and other users without editing or admin access log in as before, and are linked to their Nextcloud user ID on their next login. Creating accounts for new users carries on working too. The one change is that accounts with editing or admin access are no longer matched by email address or username, as that is what allowed someone to take over an administrator account. They need linking once, either: 1. Log in with your WordPress password, go to Users -> Profile and click "Link my Nextcloud account", or 2. An administrator enters their Nextcloud user ID on their user edit screen, or 3. Link lots of users at once with WP-CLI (see "Can I link lots of users at once?" below). A notice in the WordPress admin lists the accounts that still need linking. Accounts the plugin created have a random password, so use "Lost your password" to get in, or have an administrator enter their Nextcloud user ID. Once everyone is linked, click "Only match by Nextcloud user ID" in the notice. = Can WordPress roles follow Nextcloud groups? = Yes, in Step 3: 1. Set "Default WordPress role for new users" to "Custom match Nextcloud user groups to WordPress roles" 2. Set "Update WordPress roles from Nextcloud groups on every login" to Yes 3. Add the Nextcloud groups for each role, and save Each Nextcloud login then sets the user's roles from their Nextcloud groups, so removing someone from a group in Nextcloud removes the role at their next login. Set it to No and groups are only used when an account is created, as before 2.3.0. * Only roles with a group, and the fallback role, are changed. Other roles are left alone. * Anyone with no matching role and no fallback role cannot log in with Nextcloud. * The Administrator role is never removed automatically, so a mistake in Nextcloud cannot lock anyone out. Remove it in WordPress instead, or see the tims_nso_sync_can_remove_role filter below. * Roles only change when someone logs in with Nextcloud, not with a WordPress password. "Save and test with secret" in step 2 loads your Nextcloud groups, and "Refresh groups from Nextcloud" loads them again later. Click a group to add it to the role you last clicked, groups already matched to a role are shown in blue. Sign in as a Nextcloud administrator to load every group. Groups are matched by their Nextcloud group ID, which is usually the same as the name. If someone is in groups for more than one role, you can give them every matching role or only the highest one. Drag the roles to change their order. The "Who gets which role" box under the groups lists who gets which role as you make changes, which groups are not used yet, and what everyone else gets. This is off by default, so updating does not change anyone's roles until you turn it on. = How do I check my settings work? = The settings page has two test buttons: * "Test connection", beside the Nextcloud URL in step 1, checks Nextcloud can be reached straight away, and the client identifier once it is added. * "Save and test with secret", under the secret in step 2, saves your settings, then signs you in to Nextcloud and back, to check the secret works too, and loads the Nextcloud groups. It does not log you in to WordPress. = What are the Advanced options? = Optional extras at the bottom of the settings page, all off by default: * Show the Nextcloud user ID on the Users list. Sites updating from an earlier version keep it switched on. * Show the last Nextcloud login on the Users list. * Use Nextcloud profile pictures for linked users. The picture is copied to your site each time they log in with Nextcloud (at most every 12 hours), so it appears after their next Nextcloud login, works on https sites even if Nextcloud is on http, and visitors never connect to your Nextcloud. Users without a picture in Nextcloud keep their normal WordPress picture. Their profile says to change the picture in Nextcloud instead of on Gravatar. * Keep name and email address in sync with Nextcloud on every login. An email address used by another account is never copied. * Only allow logging in with Nextcloud. The login page sends everyone to Nextcloud, add ?local=1 to the login URL to use a WordPress password. You can change the word local to your own in "Password login word". If Nextcloud is down the normal password form is shown. * Show a register link under the login button. Adds "No account yet? Register with Nextcloud" under the login button on the WordPress login page and under the login block. It links to the Registration app on your Nextcloud (which needs to be installed in Nextcloud), or to your own register page address. You can also change the link text. * Send users to Nextcloud after logging out. Linked users go to your Nextcloud after logging out of WordPress. This does not log them out of Nextcloud, which only allows logging out from its own pages. * Check Nextcloud is online every hour. If Nextcloud cannot be reached or is in maintenance mode, one email is sent to the addresses in "Send alerts to" (or the site administrator if blank), saying when it was checked and what went wrong, and a warning shows in the WordPress admin. Another email is sent when it is back. While it is down, steps 1 and 2 stay open on the settings page with the error, and clicking Test connection checks again straight away. Checks use WordPress's built-in scheduler (WP-Cron). In its default mode WP-Cron is only triggered by page views, so on quiet sites checks can be late unless WP-Cron is set up as a real server cron job. * Delete all plugin data when the plugin is deleted, or straight away with the "Delete all plugin data now" button. * Storage Type, where the key that protects each login is kept, and the debug log, for finding out why a login fails. = What happens to my data if I remove the plugin? = Deactivating the plugin keeps everything. Deleting it also keeps everything, unless you tick "Delete all plugin data when the plugin is deleted" in the Advanced options, then the settings, account links, copied profile pictures and debug log are removed. A log file set with TIMS_NSO_LOG_FILE is never deleted. To start again without removing the plugin, use "Delete all plugin data now" in the Advanced options. It deletes the same data straight away, after asking you to confirm. WordPress users are kept, but linked accounts need linking again. A Secret in wp-config.php is not removed. = Can I test new versions before they are released? = Sometimes a new version is available to test before it is released. If there is one, you can download it from the Advanced tab on this plugin's page (Development Version, under Previous Versions). Please test it on a staging site first, and let me know how it goes on the support forum. Your site will update to the full release automatically when it comes out. = Are there any filters available so I can make my own changes? = Yes, there is: tims_nso_authorize_url which is the Nextcloud URL the user gets redirected to, and is also the last hook before they go off to your install of Nextcloud, example: add_filter('tims_nso_authorize_url', 'custom_function_name_one'); function custom_function_name_one($authorize_url){ // custom code return $authorize_url; } tims_nso_successful_login_redirect which is the URL the user goes to after successfully coming back from Nextcloud, example: add_filter('tims_nso_successful_login_redirect', 'custom_function_name_two'); function custom_function_name_two($redirect_url){ // custom code return $redirect_url; } tims_nso_nextcloud_login_button_url which is the URL the login button and shortcode login button uses, example: add_filter('tims_nso_nextcloud_login_button_url', 'custom_function_name_three'); function custom_function_name_three($url){ // custom code return $url; } tims_nso_nextcloud_user_matched which is the WordPress WP_User (Object) and the user data (Object) from Nextcloud for the successful matched user. It runs after the user has been logged in, so it is useful for reading the Nextcloud data (e.g. to update a profile field), returning a different user does not change who is logged in, example: add_filter('tims_nso_nextcloud_user_matched', 'custom_function_name_four', 10, 2); function custom_function_name_four($user,$nextcloud){ // custom code return $user; } tims_nso_is_privileged_user decides which accounts are never linked automatically by email address or username. By default this is any account that can do more than a subscriber or WooCommerce customer (edit posts, upload files, manage users, manage WooCommerce etc.). The example below also protects a custom capability: add_filter('tims_nso_is_privileged_user', 'custom_function_name_five', 10, 2); function custom_function_name_five($is_privileged, $user){ if(user_can($user, 'my_custom_capability')){ return true; } return $is_privileged; } Only make this return false if you control every Nextcloud account and users cannot change their own email address, otherwise someone could take over an administrator account. tims_nso_instance which is the name of the Nextcloud server saved with each linked account (by default the host and path of your Nextcloud URL, e.g. cloud.example.org). Links made with a different server are ignored, so if you move Nextcloud to a new address you can use this to keep the existing links working, example: add_filter('tims_nso_instance', 'custom_function_name_six'); function custom_function_name_six($instance){ // Nextcloud moved from cloud.old-example.org, keep using the old links return 'cloud.old-example.org'; } tims_nso_roles_from_groups which is the list of WordPress roles worked out from the user's Nextcloud groups, used when an account is created and when roles are updated on login, example: add_filter('tims_nso_roles_from_groups', 'custom_function_name_nine', 10, 2); function custom_function_name_nine($roles, $nextcloud){ // custom code return $roles; } tims_nso_sync_can_remove_role decides if "Update WordPress roles from Nextcloud groups on every login" can remove a role from a user. By default every role can be removed except Administrator. The example below also protects the Editor role, return true for administrator if you want Nextcloud to be able to remove it, the last administrator on the site is still never removed: add_filter('tims_nso_sync_can_remove_role', 'custom_function_name_eleven', 10, 3); function custom_function_name_eleven($can_remove, $role, $user){ if($role == 'editor'){ return false; } return $can_remove; } tims_nso_allow_login decides if a Nextcloud user can log in, return false to stop them. It runs before an account is linked or created, with the user data (Object) from Nextcloud and the linked WordPress user (WP_User, or false if they are not linked yet). The example below only lets members of the Nextcloud "staff" group log in: add_filter('tims_nso_allow_login', 'custom_function_name_twelve', 10, 3); function custom_function_name_twelve($allowed, $nextcloud, $user){ if(empty($nextcloud->groups) || !in_array('staff', $nextcloud->groups, true)){ return false; } return $allowed; } tims_nso_new_user_data which is the user data used to create a new account (user_login and user_email by default), and the user data (Object) from Nextcloud. You can add anything wp_insert_user() accepts, the example below uses the Nextcloud display name: add_filter('tims_nso_new_user_data', 'custom_function_name_thirteen', 10, 2); function custom_function_name_thirteen($userdata, $nextcloud){ if(!empty($nextcloud->displayname)){ $userdata['display_name'] = $nextcloud->displayname; } return $userdata; } An account is not created if the username or email address is already used on the site, the user is asked to link their existing account instead. tims_nso_logout_url which is the address linked users are sent to when "Send users to Nextcloud after logging out" is on, your Nextcloud URL by default, example: add_filter('tims_nso_logout_url', 'custom_function_name_seventeen'); function custom_function_name_seventeen($logout_url){ return 'https://cloud.example.org/apps/files/'; } tims_nso_register_url which is the address the register link goes to, example: add_filter('tims_nso_register_url', 'custom_function_name_twenty'); function custom_function_name_twenty($url){ return 'https://www.example.org/join/'; } tims_nso_monitor_email which is who the Nextcloud online check emails, the addresses in "Send alerts to" or the site administrator email by default, example: add_filter('tims_nso_monitor_email', 'custom_function_name_eighteen'); function custom_function_name_eighteen($email){ return 'it@example.org'; } tims_nso_check_available decides if the plugin checks Nextcloud is up before sending someone there to log in. If Nextcloud cannot be reached or is in maintenance mode, people see a message instead of a browser error. Return false to skip the check, for example if your Nextcloud blocks status.php: add_filter('tims_nso_check_available', '__return_false'); = Are there any actions available? = Yes, tims_nso_user_linked runs when a WordPress account is linked to a Nextcloud account (from the profile page, by an administrator, when an account is created, or when it is linked automatically), and tims_nso_user_unlinked runs when the link is removed, example: add_action('tims_nso_user_linked', 'custom_function_name_seven', 10, 2); function custom_function_name_seven($user_id, $nextcloud_user_id){ // custom code } add_action('tims_nso_user_unlinked', 'custom_function_name_eight'); function custom_function_name_eight($user_id){ // custom code } tims_nso_roles_synced runs when a user's roles are changed by "Update WordPress roles from Nextcloud groups on every login", with the roles that were added and removed, example: add_action('tims_nso_roles_synced', 'custom_function_name_ten', 10, 3); function custom_function_name_ten($user_id, $added_roles, $removed_roles){ // custom code } tims_nso_user_created runs after the plugin creates a new account, with the new user ID and the user data (Object) from Nextcloud, example: add_action('tims_nso_user_created', 'custom_function_name_fourteen', 10, 2); function custom_function_name_fourteen($user_id, $nextcloud){ // custom code, e.g. send a welcome email } tims_nso_logged_in runs after someone has logged in with Nextcloud, with the WordPress WP_User (Object) and the user data (Object) from Nextcloud, example: add_action('tims_nso_logged_in', 'custom_function_name_fifteen', 10, 2); function custom_function_name_fifteen($user, $nextcloud){ // custom code } tims_nso_login_error runs when a Nextcloud login, account link, group load or connection test fails, with the error code (e.g. not-linked, no-role, returned-invalid) and what was being done (login, link, groups or test), example: add_action('tims_nso_login_error', 'custom_function_name_sixteen', 10, 2); function custom_function_name_sixteen($error, $intent){ // custom code, e.g. log failed logins } tims_nso_monitor_checked runs after each Nextcloud online check, with the status (ok, maintenance or down), the previous status and any error, for example to send an alert somewhere else: add_action('tims_nso_monitor_checked', 'custom_function_name_nineteen', 10, 3); function custom_function_name_nineteen($status, $previous_status, $error){ // custom code } The standard WordPress wp_login action also runs after a successful Nextcloud login. = Are there any settings I can add to wp-config.php? = Yes, there are: NEXTCLOUD_SECRET to store your Nextcloud secret key in wp-config.php instead of the database: define('NEXTCLOUD_SECRET', 'Your Secret key'); TIMS_NSO_LOG_FILE to choose where the debug log is saved, ideally somewhere outside your web root. By default it is saved in wp-content/uploads/tims-nso-logs/ with a random file name: define('TIMS_NSO_LOG_FILE', '/home/example/logs/nextcloud-sso.log'); = Are there WP-CLI commands? = Yes: wp tims-nso status wp tims-nso list wp tims-nso list --linked --format=csv wp tims-nso link wp tims-nso unlink status shows the main settings and how many users are linked. list shows every user with their Nextcloud user ID, server and last Nextcloud login (--format can be table, csv, json or yaml). link and unlink take a WordPress user ID, username or email address. Run wp help tims-nso for the details. = Can I link lots of users at once? = Yes, with the WP-CLI link command above, for example: wp tims-nso link 12 jsmith wp tims-nso link jo@example.org jsmith Use the Nextcloud user ID (login name), not the display name. The link is saved in two user meta fields, tims_nso_nc_uid (the Nextcloud user ID) and tims_nso_nc_instance (the Nextcloud server, see the tims_nso_instance filter above), if you would rather set them another way. The Nextcloud column on the Users list (Advanced options) shows who is linked, and shows "(other server)" if the instance does not match. = I am getting a "Nextcloud server returned but with an invalid state for this session" error = Before you go off to Nextcloud the site needs to store a unique key to verify the response when you come back, if this key is removed before you come back this is when you see this message. By default, the key is stored in the PHP session but if you are having trouble you can open Advanced options in the plugin settings and set the "Storage Type" to Cookie and this should solve the issue. = I am stuck on my Nextcloud install when I click "Grant access", it does not do anything? = If you check the JS console log and see a message like "Refused to send form data to ... because it violates the following Content Security Policy directive...." then you need to edit your Nextcloud config file, usually located at nextcloud/config/config.php and add the line: 'overwriteprotocol' => 'https', = Is the plugin translated? = Yes, it comes with German, French, Dutch, Spanish and English (Pirate) translations. If you would like to help translate it into your language, or improve a translation, you can on [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/tims-nextcloud-sso-oauth2/). = Is there a paid version? = Nope, just a simple free plugin to enable you to log in to your site with Nextcloud. = Where do I report security bugs found in this plugin? = Please report security bugs found in the source code of the Tim's Nextcloud SSO OAuth2 plugin through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/b13f891f-b190-4db9-8801-5ee380533bd8). The Patchstack team will assist you with verification, CVE assignment, and notify the developers of this plugin. = I need help = If you have any problems please reach out on the support forum or directly [here](https://www.timoxendale.co.uk/plugins/wordpress-nextcloud-sso-oauth2/#support). I will try my best to help. == Screenshots == 1. The settings page once set up. Steps 1 and 2 fold into one line, and Step 3 asks two plain questions with a summary of what happens on a first login. 2. Steps 1 and 2. Test connection sits beside the Nextcloud URL, and Save and test with secret sits under the secret. 3. The setup checklist on a new install. 4. Matching existing accounts by email address, with the warning and the first login summary. 5. Matching Nextcloud groups to WordPress roles, with the group buttons and the "Who gets which role" summary. 6. Steps 4 and 5, where users go after logging in and the login page button. 7. The Advanced options, all off by default. 8. When Nextcloud cannot be reached, a warning shows in the admin and Test connection checks again straight away. 9. The WordPress login page with the Nextcloud login button and register link. 10. The Nextcloud Login Button block on a page, with the default style and with custom text, colours and full width. 11. A linked Nextcloud account on a user profile. 12. The Users list with the Nextcloud user ID and last Nextcloud login columns. == Upgrade Notice == = 2.3.0 = Updating from before 2.1.0? Administrators, editors and other privileged users link Nextcloud once from their profile, using their WordPress password. Your settings are kept. Adds role sync, a login block and a simpler settings page. New options are off by default. Needs WordPress 5.9 or later. = 2.1.0 = Important security update, please update now. Existing settings are kept and normal users carry on logging in as before. Administrators, editors and other privileged users need to link their Nextcloud account once from their profile page. == Changelog == = 2.3.0 = Release Date: 30th November 2026 2.2.0 was only used for testing and was not released, its changes are included here. **Updating from before 2.1.0:** your settings are kept, but administrators, editors and other privileged users need to link their Nextcloud account once from their profile, using their WordPress password. A notice in the WordPress admin lists who still needs linking. Already on 2.1.0? Linked accounts carry on working. **Roles from Nextcloud groups** * New: update WordPress roles from Nextcloud groups on every login. Off by default, and the Administrator role is never removed automatically. * New: load your Nextcloud groups, click a group to add it to a role, and see who gets which role as you make changes. * New: give people in more than one group every matching role, or only the highest one. Drag the roles to set the order. **Logging in** * New: Nextcloud Login Button block, with its own text, colours, alignment and full width options. * New: optional register link under the login button and login block, with your own text and address. * Nextcloud is checked before sending someone there to log in, so they see a clear message instead of a browser error when it is down. **A simpler settings page** * New setup checklist that ticks off as you test, Test connection beside the Nextcloud URL, and Save and test with secret, which also loads your Nextcloud groups. * Step 3 now asks two plain questions about existing and new accounts, with a summary of what happens on a first login. * Steps 1 and 2 fold into one line once connected, longer help moves behind More info, and Save Changes stays in view. * Works on phones, uses the standard WordPress look, and asks for a review only after a month, on the settings page only. **Advanced options, all off by default** * Nextcloud user ID and last Nextcloud login columns on the Users list (sites updating keep the Nextcloud column switched on). * Nextcloud profile pictures, with the profile pointing to Nextcloud instead of Gravatar, and keeping names and email addresses in sync. * Only allow logging in with Nextcloud, with your own password login word. * Send users to Nextcloud after logging out. * An hourly check that Nextcloud is online, with email alerts and a Check again link. * Delete all plugin data when the plugin is deleted, or straight away with a button. **For developers** * WP-CLI commands: `wp tims-nso status`, `list`, `link` and `unlink`. * New filters and actions, listed in the FAQ. **Security and other changes** * The page to return to is checked and kept in the signed login state, and finishing one login no longer cancels others. * The debug log removes tokens and cannot have extra lines added, and every setting is cleaned when saved. * A deleted fallback role no longer leaves users without a role. * A malformed return address or login cookie no longer causes an error page. * A Settings link under the plugin on the Plugins page. * All text can be translated, with German, French, Dutch, Spanish, English (UK) and Pirate translations. * Now needs WordPress 5.9 or later. = 2.1.0 = Release Date: 26th November 2026 Security fix, please update. * Security: WordPress accounts are now linked to the Nextcloud user ID, which Nextcloud users can't change. The email address and username from Nextcloud are no longer used to log in once an account is linked * Security: Administrators, editors, shop managers and other privileged accounts are never matched automatically by email address or username, they need linking once from their profile page or by an administrator * Security: Matching existing accounts by email address or username is now off by default for new installs. Existing sites keep their current setting so normal users carry on as before and are linked on their next login * Security: Added a nonce check to the Test Connection option * Security: The debug log now has a random file name in a protected folder and access tokens are removed. The old log file is deleted * Security: The state cookie is now signed and HttpOnly, and the Nextcloud secret is no longer shown in the settings page source * Security: The login button URL is now escaped in the shortcode * New: Link or unlink your Nextcloud account from your WordPress profile page * New: Administrators can set a user's Nextcloud user ID on the user edit screen, and the Users list shows who is linked * New: Admin notice listing accounts that still need linking, with an option to only match by Nextcloud user ID * New: The wp_login action now runs after a Nextcloud login, so security and activity log plugins record it * Fix: Disabled Nextcloud users now see the correct error message * Fix: The plugin no longer interferes with other plugins that return to the site with state and code in the URL * Updated the FAQ and translation files * Tested with WordPress 7.2 and Nextcloud 35.0.3 = 2.0.3 = Release Date: 22nd May 2025 - Improvements made to the Test Connection option in the settings - Updated compatibility with WordPress 6.8.1 and Nextcloud 31.0.4 = 2.0.2 = Release Date: 10th August 2023 - Implemented a feature request: When matching Nextcloud user groups to WordPress roles If no role matches there is now an option to select a default role for the user - Corrected spelling mistakes on the options page = 2.0.1 = Release Date: 1st July 2022 - Added some filter hooks = 2.0.0 = Release Date: 27th June 2022 - Revamped the options page to be more visually pleasing - Added the option to redirect the user back to where they were - The shortcode login button is now hidden if the user is already logged in - Debug log contains more information = 1.9 = Release Date: 23rd May 2022 - Organised the options page - Added a button to test the Nextcloud URL - Added some filter hooks = 1.8 = Release Date: 19th May 2022 - Added additional checks when entering the Nextcloud URL = 1.7 = Release Date: 6th May 2022 - Updated compatibility with WordPress 6.1 and Nextcloud 24.0.0 - Added some more FAQs - Made an error message more descriptive = 1.6 = Release Date: 18th March 2022 - Made improvements to the way session data is stored when going between WordPress and Nextcloud = 1.5 = Release Date: 17th March 2022 - Built in an option to store unique keys that are needed to verify the response back from Nextcloud as a PHP session or Cookie. = 1.4 = Release Date: 17th March 2022 - Made improvements to the way session data is stored when going between WordPress and Nextcloud - Tested compatibility with WordPress 5.9.3 = 1.3 = Release Date: 25th February 2022 - Updated to be compatible with older Nextcloud installs - Logs more useful information to debug file when enabled = 1.2 = Release Date: 25th February 2022 - Fixed issues with URLs that include /index.php/ = 1.1 = Release Date: 25th February 2022 - Added a new option to log debug information to a file = 1.0 = Release Date: 11th February 2022 - Initial release.