nextcloud / user_external

👥 External user authentication methods like IMAP, SMB and FTP
https://apps.nextcloud.com/apps/user_external
107 stars 64 forks source link

Fail on creating new users #204

Closed simaoafonso-pwt closed 2 years ago

simaoafonso-pwt commented 2 years ago

Steps to reproduce

  1. Login as a new user using the IMAP backend

Expected behaviour

Actual behaviour

Since updating to Nextcloud 24, creating new accounts for new users on first login fails. Login with existing accounts works.

No account is created.

Affected Authentication backend

IMAP

Server configuration

User External App version: 3.0.0

Operating system: Arch Linux

Web server: nginx v1.22

Database: PostgreSQL v14.3

PHP version: 8.1.7

Nextcloud version: 24.0.2

Where did you install Nextcloud from: System Packages

Signing status:

Signing status No errors have been found.

List of activated apps:

App list ``` Enabled: - accessibility: 1.10.0 - activity: 2.16.0 - announcementcenter: 6.3.1 - apporder: 0.15.0 - bruteforcesettings: 2.4.0 - checksum: 1.1.4 - circles: 24.0.0 - cloud_federation_api: 1.7.0 - comments: 1.14.0 - contacts: 4.1.1 - contactsinteraction: 1.5.0 - dav: 1.22.0 - external: 4.0.0 - federatedfilesharing: 1.14.0 - federation: 1.14.0 - files: 1.19.0 - files_accesscontrol: 1.14.0 - files_downloadactivity: 1.13.0 - files_external: 1.16.1 - files_markdown: 2.3.6 - files_pdfviewer: 2.5.0 - files_readmemd: 1.2.2 - files_rightclick: 1.3.0 - files_sharing: 1.16.2 - files_trashbin: 1.14.0 - files_versions: 1.17.0 - files_videoplayer: 1.13.0 - firstrunwizard: 2.13.0 - groupfolders: 12.0.1 - groupquota: 0.1.8 - logreader: 2.9.0 - lookup_server_connector: 1.12.0 - nextcloud_announcements: 1.13.0 - notifications: 2.12.0 - oauth2: 1.12.0 - password_policy: 1.14.0 - photos: 1.6.0 - privacy: 1.8.0 - provisioning_api: 1.14.0 - quota_warning: 1.14.0 - serverinfo: 1.14.0 - settings: 1.6.0 - sharebymail: 1.14.0 - sharerenamer: 3.0.1 - socialsharing_email: 2.5.0 - survey_client: 1.12.0 - systemtags: 1.14.0 - text: 3.5.1 - theming: 1.15.0 - twofactor_backupcodes: 1.13.0 - updatenotification: 1.14.0 - user_external: 3.0.0 - user_status: 1.4.0 - user_usage_report: 1.8.0 - viewer: 1.8.0 - weather_status: 1.4.0 - workflowengine: 2.6.0 Disabled: - admin_audit - dashboard: 6.0.0 - encryption - gallery: 18.3.0 - gpxmotion: 0.1.0 - guests: 2.2.0 - passwords: 2022.6.20 - recommendations: 0.4.0 - support: 1.1.1 - user_ldap ```

Nextcloud configuration:

Config report ``` 'user_backends' => array ( 0 => array ( 'class' => '\OCA\UserExternal\IMAP', 'arguments' => array ( 0 => 'imap.gmail.com', 1 => 993, 2 => 'ssl', 3 => 'DOMAIN_NAME', 4 => true, 5 => false, ), ), ), ), ```

Logs

Web server error log

Web server error log ``` {"reqId":"XXX","level":3,"time":"2022-06-28T14:32:16+00:00","remoteAddr":"10.50.57.54","user":"--","app":"user_external","method":"POST","url":"/login","message":"ERROR: Could not connect to imap server via curl: ","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0","version":"24.0.2.1"} {"reqId":"XXX","level":3,"time":"2022-06-28T14:32:17+00:00","remoteAddr":"10.50.57.54","user":"--","app":"user_external","method":"POST","url":"/login","message":"ERROR: Could not connect to imap server via curl: ","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0","version":"24.0.2.1"} {"reqId":"XXX","level":2,"time":"2022-06-28T14:32:17+00:00","remoteAddr":"10.50.57.54","user":"--","app":"no app in context","method":"POST","url":"/login","message":"Login failed: EMAIL (Remote IP: 10.50.57.54)","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0","version":"24.0.2.1"} ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` Insert your Nextcloud log here ```

Browser log

Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
simaoafonso-pwt commented 2 years ago

Turns out this was an "issue" on the Google side, the "Less secure app access" setting was on.

Sorry about this.