Home / Plugins / Tim’s Nextcloud SSO OAuth2

Tim’s Nextcloud SSO OAuth2

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 23.0.0, if you have any problems please reach out on the support forum.

Note this isn’t an official plugin from Nextcloud, it’s just from someone that uses it with WordPress alot.

  • Options Page
  • Options Page

Install Tim’s Nextcloud SSO OAuth2 either via the WordPress.org plugin directory, or by uploading the files to your server.

Activate the plugin through the ‘Plugins’ menu in WordPress.

Once Active go to Settings -> Nextcloud OAuth2 in the WordPress admin area and follow the setup instructions.

How do I set the plugin up?

If you go to the settings page (Settings -> Nextcloud OAuth2) it gives you a simple breakdown of what’s needed to setup the OAuth2 connection with your Nextcloud install.

  1. Login to your Nextcloud install
  2. Go to Settings -> Security
  3. Then under “OAuth 2.0 clients” add a new client
  4. Set the name to anything you like and the redirect URL to your site URL
  5. Then copy the Client Identifier and Secret keys in the below form
  6. Then enter your Nextcloud URL in the form below
  7. Then set any settigns you require, then click save

What’s my Nextcloud URL?

This is the URL that you have installed Nextcloud at e.g. https://cloud.example.com/, if you have installed it in a subfolder, please include that e.g. https://example.com/cloud/. If your Nextcloud URLs look like https://example.com/index.php/apps/dashboard/ then please include the /index.php/ in the URL e.g. https://example.com/index.php/.

Where is the settings page?

It’s under Settings and called “Nextcloud OAuth2”

Is there a shortcode to add a login button?

Yes, it’s [nextcloud_login class=”btn”]button text[/nextcloud_login] and there is an option to enable a button on the WordPress login screen, or you can use the URL www.example.com/wp-login.php?nc-sso=redirect

Is there a paid version?

Nope, just a simple free plugin to enable you to login to your site with Nextcloud

There are no reviews for this plugin.

“Tim’s Nextcloud SSO OAuth2” is open source software. The following people have contributed to this plugin.

Contributors

1.0

Release Date: 11th February 2022


Source link