Starting with version 5.0, Admidio can be used by other applications to authenticate users against Admidio's user base. These instructions will guide you through the process of connecting Nextcloud to Admidio to use Admidio's login. For general instructions, and other apps, please visit the general Single-Sign-On overview page.
Nextcloud provides several apps that offer OpenID Connect login to Nextcloud:
| App | Homepage | Comments |
|---|---|---|
| OpenID Connect user backend (user_oidc) | Appstore, Homepage/Sourcecode | Official OIDC app, supportsauto-discovery, supports groups, supports field mapping, supports auto-creation of user accounts on login. |
| OpenID Connect Login (oidc_login) | Appstore, Homepage/Sorucecode | Forked off sociallogin, configuration only via config file, no UI. Supports auto-discovery, supports groups, supports field mapping, supports auto-creation of user accounts on login. |
| Social Login (sociallogin) | Appstore, Homepage/Sourcecode | Targeted at providing login through social apps, allows generic OpenID Connect or OAuth login. No Auto-discovery. Supports groups. Creates its own usernames and groups, does not support accounts that were created locally or through other backends! |
Throughout the document we will assume you have both Admidio and Nextcloud already set up properly at https://admidio.local/ and https://nextcloud.local/. Please modify these URLs to your actual installation.
As a first step, one needs to configure Admidio to act as an OpenID Provider (OP). This has to be done once and is not specific to any particular client. Please folow this guide:
Basically, one needs to enable OpenID Connect (OIDC). The Issuer URL should in most cases be left blank, which means Admidio's public URL will be used as issuer URL.
The page https://admidio.local/adm_program/modules/preferences.php?panel=sso also provides the link to the automatic discovery URL, and the individual settings for clients that do not support auto-configuration via metadata.
Setting up a client (OpenID „Relying Party“ = „RP“) to use Admidio's user accounts for log-in consists of two steps:
The concrete steps are:
The most convenient OpenID Connect support for Nextcloud is provided by the „OpenID Connect user backend (user_oidc)“ plugin. It supports multiple OpenID Providers, support for groups, fields mapping, automatic user-creation on login and auto-discovery of settings. Its configuration is done in Nextcloud's preferences UI.
For convenient mapping of OIDC claims to Nextcloud profile fields, use the OIDC Claim Mapping plugin. To map admidio groups to Nextcloud groups in a visual style, use the OIDC Groups Mapping plugin.
First, install the OpenID Connect user backend app in Nextcloud:
After installation it can be configured by an administrator in Nextcloud's preferences in the menu item „Administration“ → „OpenID Connect“.
The configuration of the provider in Nextcloud is now best done in parallel with the client configuration in Admidio.
It is now a good idea to keep two browser windows open with Admidio and Nextcloud's configuration so one can easily select and copy the settings. Admidio even provides little „copy“ buttons/icons to copy the various settings to the clipboard for easy pasting into the Nextcloud configuration.
Return to Admidio's SSO preferences page, go to the „Single-Sign-On Client Administration“ (the button right below the endpoint URLs and above the „Save“ button), and create a new client.
https://[YOUR_ADMIDIO]/modules/sso/index.php/oidc/.well-known/openid-configuration) from Admidio to configure most of the general OpenID Connect settings automatically. Copy the Discovery URL from the top of the OIDC client page in Admitio into NextCloud's „Discovery endoint“ field. All other endpoints shown in Admidio's preferences screen are provided in the discovery document and don't need to be copied manually.After saving the changes (both in Nextcloud and Admidio), the apps should should now be set up for single-sign-on in Nextcloud.
The „**OpenID Connect Login**“ plugin for Nextcloud provides OpenID login with support for groups, field mapping, automatic user-creation on login and auto-discovery of settings. Its configuration is done entirely in Nextcloud's config/config.php file, there is no graphical user interface.
config/config.php in a text editor and insert the following configuration options into the array at the end of the file:<?php $CONFIG = array ( [...] // Configuration for nextcloud-oidc-login // Source/Documentation: https://github.com/pulsejet/nextcloud-oidc-login // Configuration is done in the config.php file ONLY 'allow_user_to_change_display_name' => false, 'lost_password_link' => 'disabled', // URL of provider. All other URLs are auto-discovered from .well-known 'oidc_login_provider_url' => 'https://admidio.local/modules/sso/index.php/oidc', 'oidc_login_button_text' => 'OpenID with Admidio (login_oidc)', 'oidc_login_client_id' => 'https://nextcloud.local/login_oidc', 'oidc_login_client_secret' => 'eZ9QTb7BIcGLUrKadeMQel8/dZyPiqNS', 'oidc_login_logout_url' => 'https://nextcloud.local/', 'oidc_login_end_session_redirect' => true, 'oidc_login_hide_password_form' => false, 'oidc_login_use_id_token' => false, 'oidc_login_attributes' => array ( 'id' => 'sub', 'name' => 'fullname', 'mail' => 'email', 'groups' => 'groups', 'is_admin' => 'groups_admin', ), 'oidc_login_scope' => 'openid profile email address phone groups custom', 'oidc_login_disable_registration' => false, // 'oidc_login_redir_fallback' => true, 'oidc_login_tls_verify' => true, 'oidc_create_groups' => true, 'oidc_login_webdav_enabled' => true, 'oidc_login_password_authentication' => true, 'oidc_login_public_key_caching_time' => 86400, 'oidc_login_min_time_between_jwks_requests' => 10, 'oidc_login_well_known_caching_time' => 86400, 'oidc_login_code_challenge_method' => 'S256', );
The plugin supports some more settings (as described on its homepage), which you can insert as needed.
config/config.php file, so one can easily select and copy the settings. Admidio even provides little „copy“ buttons/icons to copy the various settings to the clipboard for easy pasting into the Nextcloud configuration.\'oidc_login_provider_url\':'oidc_login_provider_url' => 'https://admidio.local/modules/sso/index.php/oidc',
https://[YOUR_NEXTCLOUD]/apps/oidc_login/oidcThat's it, login via OpenID Connect should now be possible with Admidio's user accounts.
Nextcloud's **Social Login** plugin is distributed together with Nextcloud with the purpose of allowing login to Nextcloud using user accounts from social networks like Google, Facebook, Twitter, GitHub, etc. However, most of these use the OpenID Connect standard (or the OAuth 2.0 standard, on which OpenID is based), so it also allows generic OpenID providers to be used as login backend for Nextcloud.
One drawback of the sociallogin plugin compared to the user_oidc and oidc_login plugins described above is that the sociallogin plugin does not reuse existing user accounts and groups, but always creates custom accounts with the prefix configured for the account. This means that it is not possible for a local account to connect an OpenID account to log in to the existing account. Other plugins also use that approach for security reasons, but they allow turning off that behavior.
It is now a good idea to keep two browser windows open with Admidio and Nextcloud's configuration so one can easily select and copy the settings. Admidio even provides little „copy“ buttons/icons to copy the various settings to the clipboard for easy pasting into the Nextcloud configuration.
Return to Admidio's SSO preferences page, go to the „Single-Sign-On Client Administration“ (the button right below the endpoint URLs and above the „Save“ button), and create a new client.
https://[YOUR_NEXTCLOUD]/apps/sociallogin/custom_oidc/[INTERNAL_NAME].After saving the changes (both in Nextcloud and Admidio), the apps should should now be set up for single-sign-on in Nextcloud.
Admidio and Nextcloud should now be set up to use Admidio for logging in to Nextcloud. If you log out of Nextcloud and try to log in again, you will be shown the Admidio login screen and then redirected back to Nextcloud. The login buttons for each of the three possible OpenID plugins look very similar and work similar.
After successful login to Admidio, the user will be redirected back to Nextcloud and logged in.
Even though login looks idential for all three, internally, there are difference in how the login is registered.