Tim’s Nextcloud SSO OAuth2
Enables you to login to your WordPress site with your Nextcloud account with OAuth2.
Install in
Just a simple OAuth2 plugin so you can login to your WordPress site from Nextcloud, there is an option to add a login button on the WordPress login page and a shortcode so you can generate your own button. You can set what Nextcloud user groups get mapped to what WordPress user role and what page the users get redirected to on successful login. If you’re using the External sites app in Nextcloud you can set the URL as www.example.com/wp-login.php?nc-sso=redirect and it will auto redirect the user to your Nextcloud install to login without them having to click the login 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.
Note this isn’t an official plugin from Nextcloud, it’s just from someone that uses it with WordPress alot.
Written by Joobi from the project's own listing. See the source page
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.
Follow this listing's changes (Atom feed)