### Steps to reproduce 1. Activate SSO & SAML app 2. Configuring environment based authentication 3. Create Apache config for HTTP BASIC Auth ### Expected behaviour Login via HTTP BASIC Auth, list user files and let the user edit files with collaboraoffice. ### Actual behaviour Auth and list files works well but open a document with collaboraoffice throws an error. ### Server configuration **Operating system**: Debian 9.5 **Web server:** Apache 2.4.25 **Database:** MariaDB 10.1.26 **PHP version:** 7.0.30 **Nextcloud version:** (see Nextcloud admin page) 13.0.5 **Updated from an older Nextcloud/ownCloud or fresh install:** No **Where did you install Nextcloud from:** https://download.nextcloud.com/server/releases/nextcloud-13.0.5.zip **Signing status:** No errors have been found. **List of activated apps:** <details> <summary>App list</summary> Enabled: - activity: 2.6.1 - bruteforcesettings: 1.1.0 - comments: 1.3.0 - dav: 1.4.7 - federatedfilesharing: 1.3.1 - federation: 1.3.0 - files: 1.8.0 - files_sharing: 1.5.0 - files_texteditor: 2.5.1 - files_trashbin: 1.3.0 - files_versions: 1.6.0 - files_videoplayer: 1.2.0 - firstrunwizard: 2.2.1 - gallery: 18.0.0 - logreader: 2.0.0 - lookup_server_connector: 1.1.0 - nextcloud_announcements: 1.2.0 - notifications: 2.1.2 - oauth2: 1.1.1 - password_policy: 1.3.0 - provisioning_api: 1.3.0 - richdocuments: 2.0.10 - serverinfo: 1.3.0 - sharebymail: 1.3.0 - survey_client: 1.1.0 - systemtags: 1.3.0 - theming: 1.4.5 - twofactor_backupcodes: 1.2.3 - updatenotification: 1.3.0 - user_saml: 1.4.2 - workflowengine: 1.3.0 Disabled: - admin_audit - encryption - files_external - files_pdfviewer - user_external - user_ldap </details> **Nextcloud configuration:** <details> <summary>Config report</summary> { "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "xxx" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "overwrite.cli.url": "https:\/\/xxx\/nextcloud", "dbtype": "mysql", "version": "13.0.5.2", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true } } </details> **Are you using external storage, if yes which one:** local **Are you using encryption:** no **Are you using an external user-backend, if yes which one:** environment based authentication #### Apache configuration <details> <summary>Apache config</summary> <Location "/"> AuthType Basic AuthUserFile /var/www/.htpasswd AuthName "xxx" Order deny,allow Allow from all require valid-user </Location> </details> ### Client configuration **Browser:** Google Chrome 67.0.3396.99 **Operating system:** Windows 10 ### Logs #### Web server error log <details> <summary>Web server error log</summary> [Tue Aug 14 11:04:17.106547 2018] [auth_basic:error] [pid 18758] [client xxx:58842] AH01614: client used wrong authentication scheme: /nextcloud/index.php/apps/richdocuments/wopi/files/191_ocgwwgtdhqpb [Tue Aug 14 11:04:59.262477 2018] [auth_basic:error] [pid 18752] [client xxx:58854] AH01614: client used wrong authentication scheme: /nextcloud/index.php/apps/richdocuments/wopi/files/152_ocgwwgtdhqpb [Tue Aug 14 11:12:32.535453 2018] [auth_basic:error] [pid 18761] [client xxx:58866] AH01614: client used wrong authentication scheme: /nextcloud/index.php/apps/richdocuments/wopi/files/125_ocgwwgtdhqpb </details> #### Nextcloud log (data/nextcloud.log) empty #### Browser log <details> <summary>Browser log</summary> DevTools failed to parse SourceMap: https://xxx/nextcloud/core/vendor/purify.min.js.map core.js?v=62311569-0:7 JQMIGRATE: Migrate is installed, version 1.4.0 DevTools failed to parse SourceMap: https://xxx/nextcloud/core/vendor/purify.min.js.map core.js?v=62311569-0:7 JQMIGRATE: Migrate is installed, version 1.4.0 merged-template-prepend.js?v=62311569-0:3593 Deprecation warning: tipsy is deprecated. Use tooltip instead. jQuery.fn.tipsy @ merged-template-prepend.js?v=62311569-0:3593 (anonymous) @ documents.js?v=62311569-0:666 j @ core.js?v=62311569-0:2 fireWith @ core.js?v=62311569-0:2 ready @ core.js?v=62311569-0:2 I @ core.js?v=62311569-0:2 documents.js?v=62311569-0:364 Waiting for page to render… DevTools failed to parse SourceMap: https://xxx/nextcloud/core/vendor/purify.min.js.map bundle.js:56378 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/. request_JSON @ bundle.js:56378 String_ctr.(anonymous function) @ bundle.js:56402 (anonymous) @ bundle.js:56578 (anonymous) @ bundle.js:56601 14.fs @ bundle.js:56603 s @ bundle.js:1 (anonymous) @ bundle.js:1 (anonymous) @ bundle.js:24120 5../dist/errormessages @ bundle.js:24234 s @ bundle.js:1 e @ bundle.js:1 (anonymous) @ bundle.js:1 manifest:1 GET https://xxx/nextcloud/index.php/apps/theming/manifest?v=0 401 (Unauthorized) manifest:1 Manifest: Line: 1, column: 1, Unexpected token. </details>