Nextcloud uses the user_oidc extension in order to handle OIDC authentication.
You must first install this extension on your instance, then go to your
Settings > OpenID Connect
menu and fill in the following parameters.
{{ service.config["client_id"] }}
{{ service.config["client_secret"] }}
{{ url_for("sso.oidc_discovery", service_uuid=service.uuid, _external=True) }}
openid email profile
Use unique user id
.