Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Cannot add U2F device #690

Closed
vonProteus opened this issue Mar 30, 2020 · 7 comments
Closed

Cannot add U2F device #690

vonProteus opened this issue Mar 30, 2020 · 7 comments

Comments

@vonProteus
Copy link

vonProteus commented Mar 30, 2020

Expected behaviour

i want to add u2f key

Actual behaviour

i cannot

{
   "reqId":"YzepTr91PibXfDlmLO82",
   "level":3,
   "time":"2020-03-30T16:59:53+00:00",
   "remoteAddr":"10.0.19.80",
   "user":"vonProteus",
   "app":"index",
   "method":"POST",
   "url":"/apps/twofactor_u2f/settings/finishregister",
   "message":{
      "Exception":"Exception",
      "Message":"Argument 1 passed to OCA\\TwoFactorU2F\\Controller\\SettingsController::finishRegister() must be ofthe type string, null given, called in /var/www/html/lib/private/AppFramework/Http/Dispatcher.php on line 170",
      "Code":0,
      "Trace":[
         {
            "file":"/var/www/html/lib/private/AppFramework/App.php",
            "line":125,
            "function":"dispatch",
            "class":"OC\\AppFramework\\Http\\Dispatcher",
            "type":"->",
            "args":[
               {
                  "__class__":"OCA\\TwoFactorU2F\\Controller\\SettingsController"
               },
               "finishRegister"
            ]
         },
         {
            "file":"/var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php",
            "line":47,
            "function":"main",
            "class":"OC\\AppFramework\\App",
            "type":"::",
            "args":[
               "OCA\\TwoFactorU2F\\Controller\\SettingsController",
               "finishRegister",
               {
                  "__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"
               },
               {
                  "_route":"twofactor_u2f.settings.finishRegister"
               }
            ]
         },
         {
            "function":"__invoke",
            "class":"OC\\AppFramework\\Routing\\RouteActionHandler",
            "type":"->",
            "args":[
               {
                  "_route":"twofactor_u2f.settings.finishRegister"
               }
            ]
         },
         {
            "file":"/var/www/html/lib/private/Route/Router.php",
            "line":299,
            "function":"call_user_func",
            "args":[
               {
                  "__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"
               },
               {
                  "_route":"twofactor_u2f.settings.finishRegister"
               }
            ]
         },
         {
            "file":"/var/www/html/lib/base.php",
            "line":1008,
            "function":"match",
            "class":"OC\\Route\\Router",
            "type":"->",
            "args":[
               "/apps/twofactor_u2f/settings/finishregister"
            ]
         },
         {
            "file":"/var/www/html/index.php",
            "line":38,
            "function":"handleRequest",
            "class":"OC",
            "type":"::",
            "args":[

            ]
         }
      ],
      "File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
      "Line":109,
      "Previous":{
         "Exception":"TypeError",
         "Message":"Argument 1 passed to OCA\\TwoFactorU2F\\Controller\\SettingsController::finishRegister() must be of the type string, null given, called in /var/www/html/lib/private/AppFramework/Http/Dispatcher.php on line 170",
         "Code":0,
         "Trace":[
            {
               "file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
               "line":170,
               "function":"finishRegister",
               "class":"OCA\\TwoFactorU2F\\Controller\\SettingsController",
               "type":"->",
               "args":[
                  null,
                  null,
                  "4c 6704622"
               ]
            },
            {
               "file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
               "line":99,
               "function":"executeController",
               "class":"OC\\AppFramework\\Http\\Dispatcher",
               "type":"->",
               "args":[
                  {
                     "__class__":"OCA\\TwoFactorU2F\\Controller\\SettingsController"
                  },
                  "finishRegister"
               ]
            },
            {
               "file":"/var/www/html/lib/private/AppFramework/App.php",
               "line":125,
               "function":"dispatch",
               "class":"OC\\AppFramework\\Http\\Dispatcher",
               "type":"->",
               "args":[
                  {
                     "__class__":"OCA\\TwoFactorU2F\\Controller\\SettingsController"
                  },
                  "finishRegister"
               ]
            },
            {
               "file":"/var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php",
               "line":47,
               "function":"main",
               "class":"OC\\AppFramework\\App",
               "type":"::",
               "args":[
                  "OCA\\TwoFactorU2F\\Controller\\SettingsController",
                  "finishRegister",
                  {
                     "__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"
                  },
                  {
                     "_route":"twofactor_u2f.settings.finishRegister"
                  }
               ]
            },
            {
               "function":"__invoke",
               "class":"OC\\AppFramework\\Routing\\RouteActionHandler",
               "type":"->",
               "args":[
                  {
                     "_route":"twofactor_u2f.settings.finishRegister"
                  }
               ]
            },
            {
               "file":"/var/www/html/lib/private/Route/Router.php",
               "line":299,
               "function":"call_user_func",
               "args":[
                  {
                     "__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"
                  },
                  {
                     "_route":"twofactor_u2f.settings.finishRegister"
                  }
               ]
            },
            {
               "file":"/var/www/html/lib/base.php",
               "line":1008,
               "function":"match",
               "class":"OC\\Route\\Router",
               "type":"->",
               "args":[
                  "/apps/twofactor_u2f/settings/finishregister"
               ]
            },
            {
               "file":"/var/www/html/index.php",
               "line":38,
               "function":"handleRequest",
               "class":"OC",
               "type":"::",
               "args":[

               ]
            }
         ],
         "File":"/var/www/html/custom_apps/twofactor_u2f/lib/Controller/SettingsController.php",
         "Line":66
      },
      "CustomMessage":"--"
   },
   "userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:74.0) Gecko/20100101 Firefox/74.0",
   "version":"18.0.3.0"
}

Server configuration

Operating system:
Docker image sha256:5003078085a57cd7e40da225a77af363c0610b7e963b2d57bf868eec8503c986
(ARM)

Database:
Docker image
sha256:754a20b77cd8ec022c9a0de28ff3bdb2d4556c1186b64fcb9ab2816002671b3d
postgres:11 (ARM)

Version: (see admin page)
Nextcloud 18.0.3

List of activated apps:

www-data@386119da3a3b:~/html$ php occ app:list
Enabled:
  - accessibility: 1.4.0
  - activity: 2.11.0
  - bruteforcesettings: 1.5.0
  - cloud_federation_api: 1.1.0
  - comments: 1.8.0
  - dav: 1.14.0
  - federatedfilesharing: 1.8.0
  - federation: 1.8.0
  - files: 1.13.1
  - files_pdfviewer: 1.7.0
  - files_rightclick: 0.15.2
  - files_sharing: 1.10.1
  - files_trashbin: 1.8.0
  - files_versions: 1.11.0
  - files_videoplayer: 1.7.0
  - firstrunwizard: 2.7.0
  - logreader: 2.3.0
  - lookup_server_connector: 1.6.0
  - nextcloud_announcements: 1.7.0
  - notifications: 2.6.0
  - oauth2: 1.6.0
  - password_policy: 1.8.0
  - photos: 1.0.0
  - privacy: 1.2.0
  - provisioning_api: 1.8.0
  - recommendations: 0.6.0
  - serverinfo: 1.8.0
  - settings: 1.0.0
  - sharebymail: 1.8.0
  - support: 1.1.0
  - survey_client: 1.6.0
  - systemtags: 1.8.0
  - text: 2.0.0
  - theming: 1.9.0
  - twofactor_backupcodes: 1.7.0
  - twofactor_totp: 4.1.3
  - twofactor_u2f: 5.1.0
  - updatenotification: 1.8.0
  - viewer: 1.2.0
  - workflowengine: 2.0.0
Disabled:
  - admin_audit
  - encryption
  - files_external
  - user_ldap

The content of config/config.php:

ww-data@386119da3a3b:~/html$  php occ config:list system
{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "18.0.3.0",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [
            "admin"
        ],
        "twofactor_enforced_excluded_groups": []
    }
}

docker stack

version: '3'

services:
  db:
    image: postgres:11
    volumes:
    - db_data:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=***REMOVED SENSITIVE VALUE***
      - POSTGRES_PASSWORD=***REMOVED SENSITIVE VALUE***
      - POSTGRES_DB=notthis
    networks:
      - internal
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure
        delay: 5s

  nextcloud:
    image: nextcloud:stable
    environment:
      - POSTGRES_USER=***REMOVED SENSITIVE VALUE***
      - POSTGRES_PASSWORD=***REMOVED SENSITIVE VALUE***
      - POSTGRES_DB=nextcloud
      - POSTGRES_HOST=db:5432
    volumes:
      - nextcloud:/var/www/html 
      - apps:/var/www/html/custom_apps 
      - config:/var/www/html/config 
      - data:/var/www/html/data 
    networks:
      - internal
      - external
      - traefik-net
    deploy:
      mode: replicated
      replicas: 1
      restart_policy:
        condition: on-failure
        delay: 5s
      labels:
        traefik.enable: "true"
        traefik.frontend.rule: "Host:${HOST}"
        traefik.port: 80
        traefik.docker.network: traefik-net
        traefik.frontend.headers.STSSeconds: 63072000
        traefik.frontend.headers.STSIncludeSubdomains: "true"
        traefik.frontend.headers.STSPreload: "true"
        traefik.frontend.redirect.permanent: 'true'
        traefik.frontend.redirect.regex: https://(.*)/.well-known/(card|cal)dav
        traefik.frontend.redirect.replacement: https://$$1/remote.php/dav/


volumes:
  db_data:
  nextcloud:
  apps:
  config:
  data:


networks:
  external:
  internal:
    driver: overlay
    internal: true
  traefik-net:
    external: true
@ChristophWurst
Copy link
Member

Please inspect which data is sent with the /apps/twofactor_u2f/settings/finishregister request. Use the browser network tab to get that info.

@vonProteus
Copy link
Author

{
  "log": {
    "version": "1.2",
    "creator": {
      "name": "Firefox",
      "version": "74.0"
    },
    "browser": {
      "name": "Firefox",
      "version": "74.0"
    },
    "pages": [
      {
        "startedDateTime": "2020-03-31T12:58:27.941+02:00",
        "id": "page_1",
        "pageTimings": {
          "onContentLoad": 1535,
          "onLoad": 3284
        }
      }
    ],
    "entries": [
      {
        "pageref": "page_1",
        "startedDateTime": "2020-03-31T12:58:27.941+02:00",
        "request": {
          "bodySize": 21,
          "method": "POST",
          "url": "https://<nextcloud>/apps/twofactor_u2f/settings/finishregister",
          "httpVersion": "HTTP/2",
          "headers": [
            {
              "name": "Host",
              "value": "<nextcloud>"
            },
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:74.0) Gecko/20100101 Firefox/74.0"
            },
            {
              "name": "Accept",
              "value": "application/json, text/plain, */*"
            },
            {
              "name": "Accept-Language",
              "value": "en-US,en;q=0.5"
            },
            {
              "name": "Accept-Encoding",
              "value": "gzip, deflate, br"
            },
            {
              "name": "Content-Type",
              "value": "application/json;charset=utf-8"
            },
            {
              "name": "requesttoken",
              "value": "ScCmVh+IGawfgba44bmA8fvIDwABOdtasqgAcmoqoIA=:MZjPHyq/beZ4uPDvh+73gZiQRkZ0Ca4Jy+RmESh55/Y="
            },
            {
              "name": "Content-Length",
              "value": "21"
            },
            {
              "name": "Origin",
              "value": "https://<nextcloud>"
            },
            {
              "name": "DNT",
              "value": "1"
            },
            {
              "name": "Connection",
              "value": "keep-alive"
            },
            {
              "name": "Cookie",
              "value": "occg5fqytmrx=<occg5fqytmrx>; oc_sessionPassphrase=<oc_sessionPassphrase>; nc_sameSiteCookielax=true; nc_sameSiteCookiestrict=true; nc_username=vonProteus; nc_token=<nc_token>; nc_session_id=<nc_session_id>"
            },
            {
              "name": "TE",
              "value": "Trailers"
            }
          ],
          "cookies": [
            {
              "name": "occg5fqytmrx",
              "value": "<occg5fqytmrx>"
            },
            {
              "name": "oc_sessionPassphrase",
              "value": "<oc_sessionPassphrase>"
            },
            {
              "name": "nc_sameSiteCookielax",
              "value": "true"
            },
            {
              "name": "nc_sameSiteCookiestrict",
              "value": "true"
            },
            {
              "name": "nc_username",
              "value": "vonProteus"
            },
            {
              "name": "nc_token",
              "value": "<nc_token>"
            },
            {
              "name": "nc_session_id",
              "value": "<nc_session_id>"
            }
          ],
          "queryString": [],
          "headersSize": 936,
          "postData": {
            "mimeType": "application/json;charset=utf-8",
            "params": [],
            "text": "{\"name\":\"4c 6704622\"}"
          }
        },
        "response": {
          "status": 500,
          "statusText": "Internal Server Error",
          "httpVersion": "HTTP/2",
          "headers": [
            {
              "name": "cache-control",
              "value": "no-store, no-cache, must-revalidate"
            },
            {
              "name": "content-security-policy",
              "value": "default-src 'self'; script-src 'self' 'nonce-b2R2US9VNldpMTdNUmNHMjEySGFFdXQ0Z090YVJCVUVpLzVEaG1jdzg2VT06MllPNXRIdWgveFNyZklmaHNUYXRZb2dneWEwdmRHQlg4cklsNVNWanROTT0='; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *; object-src 'none'; base-uri 'self';"
            },
            {
              "name": "content-type",
              "value": "text/html; charset=UTF-8"
            },
            {
              "name": "date",
              "value": "Tue, 31 Mar 2020 10:58:27 GMT"
            },
            {
              "name": "expires",
              "value": "Thu, 19 Nov 1981 08:52:00 GMT"
            },
            {
              "name": "pragma",
              "value": "no-cache"
            },
            {
              "name": "referrer-policy",
              "value": "no-referrer"
            },
            {
              "name": "server",
              "value": "Apache/2.4.38 (Debian)"
            },
            {
              "name": "strict-transport-security",
              "value": "max-age=63072000; includeSubDomains; preload"
            },
            {
              "name": "x-content-type-options",
              "value": "nosniff"
            },
            {
              "name": "x-download-options",
              "value": "noopen"
            },
            {
              "name": "x-frame-options",
              "value": "SAMEORIGIN"
            },
            {
              "name": "x-permitted-cross-domain-policies",
              "value": "none"
            },
            {
              "name": "x-powered-by",
              "value": "PHP/7.3.16"
            },
            {
              "name": "x-robots-tag",
              "value": "none"
            },
            {
              "name": "x-xss-protection",
              "value": "1; mode=block"
            },
            {
              "name": "content-length",
              "value": "4606"
            },
            {
              "name": "X-Firefox-Spdy",
              "value": "h2"
            }
          ],
          "cookies": [],
          "content": {
            "mimeType": "text/html; charset=UTF-8",
            "size": 4606,
            "text": "<!DOCTYPE html>\n<html class=\"ng-csp\" data-placeholder-focus=\"false\" lang=\"en\" data-locale=\"pl_PL\" >\n\t<head\n data-requesttoken=\"\">\n\t\t<meta charset=\"utf-8\">\n\t\t<title>\n\t\tNextcloud\t\t</title>\n\t\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, minimum-scale=1.0\">\n\t\t\t\t<meta name=\"apple-itunes-app\" content=\"app-id=1125420102\">\n\t\t\t\t<meta name=\"theme-color\" content=\"#C917BF\">\n\t\t<link rel=\"icon\" href=\"/core/img/favicon.ico\">\n\t\t<link rel=\"apple-touch-icon\" href=\"/core/img/favicon-touch.png\">\n\t\t<link rel=\"mask-icon\" sizes=\"any\" href=\"/core/img/favicon-mask.svg\" color=\"#C917BF\">\n\t\t<link rel=\"manifest\" href=\"/apps/theming/manifest?v=4\">\n\t\t<link rel=\"stylesheet\" href=\"/apps/files_pdfviewer/css/style.css?v=6a154fe0-4\">\n<link rel=\"stylesheet\" href=\"/core/css/guest.css?v=fde050eb-4\">\n\t\t<script nonce=\"b2R2US9VNldpMTdNUmNHMjEySGFFdXQ0Z090YVJCVUVpLzVEaG1jdzg2VT06MllPNXRIdWgveFNyZklmaHNUYXRZb2dneWEwdmRHQlg4cklsNVNWanROTT0=\" defer src=\"/core/js/dist/main.js?v=fde050eb-4\"></script>\n<script nonce=\"b2R2US9VNldpMTdNUmNHMjEySGFFdXQ0Z090YVJCVUVpLzVEaG1jdzg2VT06MllPNXRIdWgveFNyZklmaHNUYXRZb2dneWEwdmRHQlg4cklsNVNWanROTT0=\" defer src=\"/js/core/merged-template-prepend.js?v=fde050eb-4\"></script>\n<script nonce=\"b2R2US9VNldpMTdNUmNHMjEySGFFdXQ0Z090YVJCVUVpLzVEaG1jdzg2VT06MllPNXRIdWgveFNyZklmaHNUYXRZb2dneWEwdmRHQlg4cklsNVNWanROTT0=\" defer src=\"/core/search/js/search.js?v=fde050eb-4\"></script>\n<script nonce=\"b2R2US9VNldpMTdNUmNHMjEySGFFdXQ0Z090YVJCVUVpLzVEaG1jdzg2VT06MllPNXRIdWgveFNyZklmaHNUYXRZb2dneWEwdmRHQlg4cklsNVNWanROTT0=\" defer src=\"/apps/files_pdfviewer/js/previewplugin.js?v=fde050eb-4\"></script>\n<script nonce=\"b2R2US9VNldpMTdNUmNHMjEySGFFdXQ0Z090YVJCVUVpLzVEaG1jdzg2VT06MllPNXRIdWgveFNyZklmaHNUYXRZb2dneWEwdmRHQlg4cklsNVNWanROTT0=\" defer src=\"/apps/files_sharing/js/dist/main.js?v=fde050eb-4\"></script>\n<script nonce=\"b2R2US9VNldpMTdNUmNHMjEySGFFdXQ0Z090YVJCVUVpLzVEaG1jdzg2VT06MllPNXRIdWgveFNyZklmaHNUYXRZb2dneWEwdmRHQlg4cklsNVNWanROTT0=\" defer src=\"/apps/files_videoplayer/js/main.js?v=fde050eb-4\"></script>\n<script nonce=\"b2R2US9VNldpMTdNUmNHMjEySGFFdXQ0Z090YVJCVUVpLzVEaG1jdzg2VT06MllPNXRIdWgveFNyZklmaHNUYXRZb2dneWEwdmRHQlg4cklsNVNWanROTT0=\" defer src=\"/apps/notifications/js/notifications.js?v=fde050eb-4\"></script>\n<script nonce=\"b2R2US9VNldpMTdNUmNHMjEySGFFdXQ0Z090YVJCVUVpLzVEaG1jdzg2VT06MllPNXRIdWgveFNyZklmaHNUYXRZb2dneWEwdmRHQlg4cklsNVNWanROTT0=\" defer src=\"/core/search/js/searchprovider.js?v=fde050eb-4\"></script>\n<script nonce=\"b2R2US9VNldpMTdNUmNHMjEySGFFdXQ0Z090YVJCVUVpLzVEaG1jdzg2VT06MllPNXRIdWgveFNyZklmaHNUYXRZb2dneWEwdmRHQlg4cklsNVNWanROTT0=\" defer src=\"/core/js/files/fileinfo.js?v=fde050eb-4\"></script>\n<script nonce=\"b2R2US9VNldpMTdNUmNHMjEySGFFdXQ0Z090YVJCVUVpLzVEaG1jdzg2VT06MllPNXRIdWgveFNyZklmaHNUYXRZb2dneWEwdmRHQlg4cklsNVNWanROTT0=\" defer src=\"/core/js/files/client.js?v=fde050eb-4\"></script>\n\t\t<script defer src=\"/apps/accessibility/js/accessibility?v=0\" nonce=\"b2R2US9VNldpMTdNUmNHMjEySGFFdXQ0Z090YVJCVUVpLzVEaG1jdzg2VT06MllPNXRIdWgveFNyZklmaHNUYXRZb2dneWEwdmRHQlg4cklsNVNWanROTT0=\"></script><link rel=\"stylesheet\" href=\"/apps/theming/styles?v=4\"/><script defer src=\"/apps/theming/js/theming?v=4\" nonce=\"b2R2US9VNldpMTdNUmNHMjEySGFFdXQ0Z090YVJCVUVpLzVEaG1jdzg2VT06MllPNXRIdWgveFNyZklmaHNUYXRZb2dneWEwdmRHQlg4cklsNVNWanROTT0=\"></script>\t</head>\n\t<body id=\"body-login\">\n\t\t<noscript>\n\t<div id=\"nojavascript\">\n\t\t<div>\n\t\t\tThis application requires JavaScript for correct operation. Please <a href=\"https://www.enable-javascript.com/\" target=\"_blank\" rel=\"noreferrer noopener\">enable JavaScript</a> and reload the page.\t\t</div>\n\t</div>\n</noscript>\n\t\t\t\t<div class=\"wrapper\">\n\t\t\t<div class=\"v-align\">\n\t\t\t\t\t\t\t\t\t<header role=\"banner\">\n\t\t\t\t\t\t<div id=\"header\">\n\t\t\t\t\t\t\t<div class=\"logo\">\n\t\t\t\t\t\t\t\t<h1 class=\"hidden-visually\">\n\t\t\t\t\t\t\t\t\tNextcloud\t\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</header>\n\t\t\t\t\t\t\t\t<main>\n\t\t\t\t\t<div class=\"error error-wide\">\n\t<h2>Internal Server Error</h2>\n\t<p>The server was unable to complete your request.</p>\n\t<p>If this happens again, please send the technical details below to the server administrator.</p>\n\t<p>More details can be found in the server log.</p>\n\n\t<h3>Technical details</h3>\n\t<ul>\n\t\t<li>Remote Address: 10.0.19.80</li>\n\t\t<li>Request ID: ekJznstG7AqgASGPjc6k</li>\n\t\t\t</ul>\n\n\t</div>\n\t\t\t\t</main>\n\t\t\t</div>\n\t\t</div>\n\t\t<footer role=\"contentinfo\">\n\t\t\t<p class=\"info\">\n\t\t\t\t<a href=\"https://<nextcloud>\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"entity-name\">Nextcloud</a> – a safe home for all your data\t\t\t</p>\n\t\t</footer>\n\t</body>\n</html>\n"
          },
          "redirectURL": "",
          "headersSize": 961,
          "bodySize": 5567
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": 0,
          "connect": 0,
          "ssl": 0,
          "send": 0,
          "wait": 272,
          "receive": 2
        },
        "time": 274,
        "_securityState": "secure",
        "serverIPAddress": "<serverIPAddress>",
        "connection": "443"
      }
    ]
  }
}

@ChristophWurst
Copy link
Member

"text": "{"name":"4c 6704622"}"

Bingo. The server expects registrationData, clientData and name. Only the last item was sent. Any other js errors?

@vonProteus
Copy link
Author

maybe?

Deprecated call $.tooltip('fixTitle') has been deprecated and should be removed 6 tooltip.js:32:12
    tooltip tooltip.js:32
    jQuery 12

or

Error: U2F device registration failed (error code unknown) AddDeviceDialog.vue:157

or

[ERROR] twofactor_u2f: Error persisting registration 
Object { app: "twofactor_u2f", uid: "vonProteus", config: {…}, request: XMLHttpRequest, response: {…}, isAxiosError: true, toJSON: toJSON() }

or

[ERROR] twofactor_u2f: Error: Server error while trying to complete U2F device registration 
Object { app: "twofactor_u2f", uid: "vonProteus" }

and some worings

do you think that my running of nextcloud in docker where nextcloud don't know anything about https could be a problem?

@ChristophWurst
Copy link
Member

Error: U2F device registration failed (error code unknown) AddDeviceDialog.vue:157

That! Do you use HTTPS? Does the served domain match the one in your config.php? Do you use a reverse proxy?

@vonProteus
Copy link
Author

yes
had to add

'overwriteprotocol' => 'https',

in config.php

@ChristophWurst
Copy link
Member

you're welcome

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants