Skip to content
This repository was archived by the owner on Nov 9, 2023. It is now read-only.
This repository was archived by the owner on Nov 9, 2023. It is now read-only.

Multi-facet endpoint not working with JS API & Chrome 59 #161

Open

Description

@kspearrin

Using Chrome 59.0.3071.109. No extension.

Navigating to https://localhost:44377/app-id.json resolves the following JSON:

{"trustedFacets":[{"version":{"major":1,"minor":0},"ids":["https://localhost:4001"]}]}

Content-type is set to application/fido.trusted-apps+json

Screenshot:

image

image

My website invoking this is at https://localhost:4001/...

Code:

// Works as expected and I get response data in callback
doRegister({
   appId: 'https://localhost:4001',
   challenge: 'YEo8uW-0QfYrSudu1B_iLurfp7kG9ECbVuCE-GVNkmc'
   version: 'U2F_V2'
});

// Does NOT work. errorCode: 2 (bad request) in callback
doRegister({
   appId: 'https://localhost:44377/app-id.json',
   challenge: 'YEo8uW-0QfYrSudu1B_iLurfp7kG9ECbVuCE-GVNkmc'
   version: 'U2F_V2'
});

function doRegister(myChallenge) {
    window.u2f.register(myChallenge.appId, [{
        version: myChallenge.version,
        challenge: myChallenge.challenge
    }], [], function (data) {
        if (data.errorCode) {
            console.log('errorCode: ' + data.errorCode);
            return;
        }
        console.log('Response: ');
        console.log(JSON.stringify(data));
        return '';
    });
}

I am using the latest (as of today) api from https://github.com/google/u2f-ref-code/blob/master/u2f-gae-demo/war/js/u2f-api.js

Any ideas?

Activity

  1. changed the title [-]Multi-facet endpoint not working with Chrome 59[/-] [+]Multi-facet endpoint not working with JS API & Chrome 59[/+] on Jun 22, 2017
  2. kspearrin commented on Jun 27, 2017

    @kspearrin
    Author

    Looks like this question on SO is having the same problem: https://stackoverflow.com/questions/33610042/u2f-integration-with-multiple-facetids-without-chrome-extension-but-u2f-api-js

    One of the answers suggests:

    I guess you have different origins in your appId json, the origin of facetID must be the same as AppID, for example: all facetID in https://example.com/app-id.json must have the same origin of https://*.example.com

    so in your case your trustFaceID should all belong to https://localhost:44300

    Is this the case? I do not see that mentioned anywhere in the spec, however, the examples shown in the spec do follow that logic.

  3. yackermann commented on Feb 8, 2018

    @yackermann

    @kspearrin Add your localhost CA cert into the browser

  4. xuwei2014 commented on Oct 1, 2018

    @xuwei2014

    @kspearrin Do you have solved this issue? I have the same problem with you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions