Skip to content

Instantly share code, notes, and snippets.

@miliya612
Last active October 21, 2018 04:31
Show Gist options
  • Save miliya612/a1c8d4b66c6090509f8f43f3e2857517 to your computer and use it in GitHub Desktop.
Save miliya612/a1c8d4b66c6090509f8f43f3e2857517 to your computer and use it in GitHub Desktop.
WebAuthn Reg&Auth

about

step

  1. Register with touchID
  2. Register with YubiKey
  3. Log in With YubiKey
  4. Log in with incorrect username

Log

1. Register with touchID

WEBAUTHN DEBUG TERMINAL
-----------------------
REGISTER START:

Sending Message to Server:
>>>>>>>>>>>>>>>>
{"username":"miliya","displayName":"miliya"}
>>>>>>>>>>>>>>>>

Received Message from Server:
<<<<<<<< [ STATUS 200 ] <<<<<<<<
{"status":"ok","errorMessage":"","rp":{"name":"WebAuthn.org"},"user":{"name":"miliya","id":"WXpFcrTpsmD_U6IXNSLFzg","displayName":"miliya"},"challenge":"Fvlp1fawEB_C8n35nMPjOb5oyrFM562P2qs5Vvg4GVfQi5Jv_sfcnV8OPT9iWeFxaVBfpqff2MXw_R5-NBX-5g","pubKeyCredParams":[{"type":"public-key","alg":-7},{"type":"public-key","alg":-257}],"timeout":60000,"attestation":"direct"}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

WebAuthn navigator.credentials.create() options:
[CreateOptions] {
    rp: {
        name: "WebAuthn.org",
    },
    user: {
        name: "miliya",
        id: [ArrayBuffer] (16 bytes)
            59 7A 45 72 B4 E9 B2 60 FF 53 A2 17 35 22 C5 CE,
        displayName: "miliya",
    },
    challenge: [ArrayBuffer] (64 bytes)
        16 F9 69 D5 F6 B0 10 1F C2 F2 7D F9 9C C3 E3 39
        BE 68 CA B1 4C E7 AD 8F DA AB 39 56 F8 38 19 57
        D0 8B 92 6F FE C7 DC 9D 5F 0E 3D 3F 62 59 E1 71
        69 50 5F A6 A7 DF D8 C5 F0 FD 1E 7E 34 15 FE E6,
    pubKeyCredParams: [
        {
            type: "public-key",
            alg: -7,
        },
        {
            type: "public-key",
            alg: -257,
        },
    ],
    timeout: 60000,
    attestation: "direct",
}
WAITING FOR USER PRESENCE...
USER PRESENCE DONE.
WebAuthn navigator.credentials.create() result:
[CredentialAttestation] {
    rawId: [ArrayBuffer] (61 bytes)
        00 FC 55 03 A0 5B AE 21 DD 95 47 58 14 00 6D D6
        A7 F3 4D 4C 95 D7 83 29 99 B3 A6 DC E9 5E FD FE
        F3 61 18 1B 2F D0 5D CB 26 CC 11 30 68 B3 49 08
        8D 7D 52 E8 8A 88 08 77 01 53 F4 92 6A,
    id: [ArrayBuffer] (61 bytes)
        00 FC 55 03 A0 5B AE 21 DD 95 47 58 14 00 6D D6
        A7 F3 4D 4C 95 D7 83 29 99 B3 A6 DC E9 5E FD FE
        F3 61 18 1B 2F D0 5D CB 26 CC 11 30 68 B3 49 08
        8D 7D 52 E8 8A 88 08 77 01 53 F4 92 6A,
    response: {
        clientDataJSON: [ArrayBuffer] (266 bytes)
            7B 22 63 68 61 6C 6C 65 6E 67 65 22 3A 22 46 76
            6C 70 31 66 61 77 45 42 5F 43 38 6E 33 35 6E 4D
            50 6A 4F 62 35 6F 79 72 46 4D 35 36 32 50 32 71
            73 35 56 76 67 34 47 56 66 51 69 35 4A 76 5F 73
            66 63 6E 56 38 4F 50 54 39 69 57 65 46 78 61 56
            42 66 70 71 66 66 32 4D 58 77 5F 52 35 2D 4E 42
            58 2D 35 67 22 2C 22 6E 65 77 5F 6B 65 79 73 5F
            6D 61 79 5F 62 65 5F 61 64 64 65 64 5F 68 65 72
            65 22 3A 22 64 6F 20 6E 6F 74 20 63 6F 6D 70 61
            72 65 20 63 6C 69 65 6E 74 44 61 74 61 4A 53 4F
            4E 20 61 67 61 69 6E 73 74 20 61 20 74 65 6D 70
            6C 61 74 65 2E 20 53 65 65 20 68 74 74 70 73 3A
            2F 2F 67 6F 6F 2E 67 6C 2F 79 61 62 50 65 78 22
            2C 22 6F 72 69 67 69 6E 22 3A 22 68 74 74 70 73
            3A 2F 2F 77 65 62 61 75 74 68 6E 2E 6F 72 67 22
            2C 22 74 79 70 65 22 3A 22 77 65 62 61 75 74 68
            6E 2E 63 72 65 61 74 65 22 7D,
        attestationObject: [ArrayBuffer] (307 bytes)
            A3 63 66 6D 74 66 70 61 63 6B 65 64 67 61 74 74
            53 74 6D 74 A2 63 61 6C 67 26 63 73 69 67 58 47
            30 45 02 20 22 F4 9D C7 D3 59 D3 C9 80 42 13 A6
            0A 2F ED F2 2B 81 B2 E2 13 5C 9F 51 18 29 CB D1
            2D 5A E3 2B 02 21 00 B9 41 C5 42 83 7D 8A 47 23
            C3 0E BA 6A 71 81 9E C0 EC 45 22 A3 B4 57 B0 15
            4E E4 88 A9 A1 06 A6 68 61 75 74 68 44 61 74 61
            58 C1 95 69 08 8F 1E CE E3 23 29 54 03 5D BD 10
            D7 CA E3 91 30 5A 27 51 B5 59 BB 8F D7 CB B2 29
            BD D4 45 5B CB FC A5 00 00 00 00 00 00 00 00 00
            00 00 00 00 00 00 00 00 3D 00 FC 55 03 A0 5B AE
            21 DD 95 47 58 14 00 6D D6 A7 F3 4D 4C 95 D7 83
            29 99 B3 A6 DC E9 5E FD FE F3 61 18 1B 2F D0 5D
            CB 26 CC 11 30 68 B3 49 08 8D 7D 52 E8 8A 88 08
            77 01 53 F4 92 6A A5 01 02 03 26 20 01 21 58 20
            A5 A4 CA 87 DD AC 85 A1 DA C8 FC C1 D6 01 14 17
            86 4C D0 E5 88 9A B6 EF D4 07 B2 DB FA 47 72 B0
            22 58 20 70 5D 87 83 C4 2C CB 4D 7B D1 17 7A 22
            5F 9E 76 8C 2C CF 24 91 70 08 F7 F6 77 25 FE 68
            B6 60 EC,
    },
}

Sending Message to Server:
>>>>>>>>>>>>>>>>
{"rawId":"APxVA6BbriHdlUdYFABt1qfzTUyV14MpmbOm3Ole_f7zYRgbL9BdyybMETBos0kIjX1S6IqICHcBU_SSag","id":"APxVA6BbriHdlUdYFABt1qfzTUyV14MpmbOm3Ole_f7zYRgbL9BdyybMETBos0kIjX1S6IqICHcBU_SSag","response":{"clientDataJSON":"eyJjaGFsbGVuZ2UiOiJGdmxwMWZhd0VCX0M4bjM1bk1Qak9iNW95ckZNNTYyUDJxczVWdmc0R1ZmUWk1SnZfc2ZjblY4T1BUOWlXZUZ4YVZCZnBxZmYyTVh3X1I1LU5CWC01ZyIsIm5ld19rZXlzX21heV9iZV9hZGRlZF9oZXJlIjoiZG8gbm90IGNvbXBhcmUgY2xpZW50RGF0YUpTT04gYWdhaW5zdCBhIHRlbXBsYXRlLiBTZWUgaHR0cHM6Ly9nb28uZ2wveWFiUGV4Iiwib3JpZ2luIjoiaHR0cHM6Ly93ZWJhdXRobi5vcmciLCJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIn0","attestationObject":"o2NmbXRmcGFja2VkZ2F0dFN0bXSiY2FsZyZjc2lnWEcwRQIgIvSdx9NZ08mAQhOmCi_t8iuBsuITXJ9RGCnL0S1a4ysCIQC5QcVCg32KRyPDDrpqcYGewOxFIqO0V7AVTuSIqaEGpmhhdXRoRGF0YVjBlWkIjx7O4yMpVANdvRDXyuORMFonUbVZu4_Xy7IpvdRFW8v8pQAAAAAAAAAAAAAAAAAAAAAAPQD8VQOgW64h3ZVHWBQAbdan801MldeDKZmzptzpXv3-82EYGy_QXcsmzBEwaLNJCI19UuiKiAh3AVP0kmqlAQIDJiABIVggpaTKh92shaHayPzB1gEUF4ZM0OWImrbv1Aey2_pHcrAiWCBwXYeDxCzLTXvRF3oiX552jCzPJJFwCPf2dyX-aLZg7A"}}
>>>>>>>>>>>>>>>>

Received Message from Server:
<<<<<<<< [ STATUS 400 ] <<<<<<<<
{"status":"failed","errorMessage":"registration failed: packed attestation: self attestation not implemented, please open a GitHub issue."}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Error: registration failed: packed attestation: self attestation not implemented, please open a GitHub issue.
Registration error: Error: registration failed: packed attestation: self attestation not implemented, please open a GitHub issue.
REGISTER DONE.

2. Register with YubiKey

REGISTER START:

Sending Message to Server:
>>>>>>>>>>>>>>>>
{"username":"miliya","displayName":"miliya"}
>>>>>>>>>>>>>>>>

Received Message from Server:
<<<<<<<< [ STATUS 200 ] <<<<<<<<
{"status":"ok","errorMessage":"","rp":{"name":"WebAuthn.org"},"user":{"name":"miliya","id":"LdpmKlBvuaXTTCfgH0H8OQ","displayName":"miliya"},"challenge":"RVMjzAkxEYOgcxaOLGt0Q-AmrI-HImgw0ENxXIYBj0MYmDZ4NB8em65UgGnQy-tsgXJ8Xri2lUHwnwGrqif_Ng","pubKeyCredParams":[{"type":"public-key","alg":-7},{"type":"public-key","alg":-257}],"timeout":60000,"attestation":"direct"}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

WebAuthn navigator.credentials.create() options:
[CreateOptions] {
    rp: {
        name: "WebAuthn.org",
    },
    user: {
        name: "miliya",
        id: [ArrayBuffer] (16 bytes)
            2D DA 66 2A 50 6F B9 A5 D3 4C 27 E0 1F 41 FC 39,
        displayName: "miliya",
    },
    challenge: [ArrayBuffer] (64 bytes)
        45 53 23 CC 09 31 11 83 A0 73 16 8E 2C 6B 74 43
        E0 26 AC 8F 87 22 68 30 D0 43 71 5C 86 01 8F 43
        18 98 36 78 34 1F 1E 9B AE 54 80 69 D0 CB EB 6C
        81 72 7C 5E B8 B6 95 41 F0 9F 01 AB AA 27 FF 36,
    pubKeyCredParams: [
        {
            type: "public-key",
            alg: -7,
        },
        {
            type: "public-key",
            alg: -257,
        },
    ],
    timeout: 60000,
    attestation: "direct",
}
WAITING FOR USER PRESENCE...
USER PRESENCE DONE.
WebAuthn navigator.credentials.create() result:
[CredentialAttestation] {
    rawId: [ArrayBuffer] (64 bytes)
        72 88 41 30 DF 30 E1 5B A4 F9 1F 24 18 C3 2D 07
        B8 F0 94 C0 16 E4 39 D9 95 46 24 88 A2 CD 87 FD
        2E B7 41 AB 03 6C 38 13 2A 81 58 B6 F2 EE 0B 09
        49 BE 69 8D 15 0F 17 D0 5C E7 49 91 D3 AD 5E B2,
    id: [ArrayBuffer] (64 bytes)
        72 88 41 30 DF 30 E1 5B A4 F9 1F 24 18 C3 2D 07
        B8 F0 94 C0 16 E4 39 D9 95 46 24 88 A2 CD 87 FD
        2E B7 41 AB 03 6C 38 13 2A 81 58 B6 F2 EE 0B 09
        49 BE 69 8D 15 0F 17 D0 5C E7 49 91 D3 AD 5E B2,
    response: {
        clientDataJSON: [ArrayBuffer] (266 bytes)
            7B 22 63 68 61 6C 6C 65 6E 67 65 22 3A 22 52 56
            4D 6A 7A 41 6B 78 45 59 4F 67 63 78 61 4F 4C 47
            74 30 51 2D 41 6D 72 49 2D 48 49 6D 67 77 30 45
            4E 78 58 49 59 42 6A 30 4D 59 6D 44 5A 34 4E 42
            38 65 6D 36 35 55 67 47 6E 51 79 2D 74 73 67 58
            4A 38 58 72 69 32 6C 55 48 77 6E 77 47 72 71 69
            66 5F 4E 67 22 2C 22 6E 65 77 5F 6B 65 79 73 5F
            6D 61 79 5F 62 65 5F 61 64 64 65 64 5F 68 65 72
            65 22 3A 22 64 6F 20 6E 6F 74 20 63 6F 6D 70 61
            72 65 20 63 6C 69 65 6E 74 44 61 74 61 4A 53 4F
            4E 20 61 67 61 69 6E 73 74 20 61 20 74 65 6D 70
            6C 61 74 65 2E 20 53 65 65 20 68 74 74 70 73 3A
            2F 2F 67 6F 6F 2E 67 6C 2F 79 61 62 50 65 78 22
            2C 22 6F 72 69 67 69 6E 22 3A 22 68 74 74 70 73
            3A 2F 2F 77 65 62 61 75 74 68 6E 2E 6F 72 67 22
            2C 22 74 79 70 65 22 3A 22 77 65 62 61 75 74 68
            6E 2E 63 72 65 61 74 65 22 7D,
        attestationObject: [ArrayBuffer] (1025 bytes)
            A3 63 66 6D 74 66 70 61 63 6B 65 64 67 61 74 74
            53 74 6D 74 A3 63 61 6C 67 26 63 73 69 67 58 48
            30 46 02 21 00 FF 2F D5 27 53 21 CA E1 FA F4 F9
            28 2F 6A 0F A0 4D 50 F2 15 A8 10 F2 10 28 97 9E
            EB 37 74 28 FC 02 21 00 B5 75 6E 8C 2E EC 6E D8
            8C 00 B7 2C 22 F3 EC 5C 6C C1 81 3A 66 98 13 B6
            CE 2B C8 EB 61 7A F1 8C 63 78 35 63 81 59 02 C2
            30 82 02 BE 30 82 01 A6 A0 03 02 01 02 02 04 74
            86 FD C2 30 0D 06 09 2A 86 48 86 F7 0D 01 01 0B
            05 00 30 2E 31 2C 30 2A 06 03 55 04 03 13 23 59
            75 62 69 63 6F 20 55 32 46 20 52 6F 6F 74 20 43
            41 20 53 65 72 69 61 6C 20 34 35 37 32 30 30 36
            33 31 30 20 17 0D 31 34 30 38 30 31 30 30 30 30
            30 30 5A 18 0F 32 30 35 30 30 39 30 34 30 30 30
            30 30 30 5A 30 6F 31 0B 30 09 06 03 55 04 06 13
            02 53 45 31 12 30 10 06 03 55 04 0A 0C 09 59 75
            62 69 63 6F 20 41 42 31 22 30 20 06 03 55 04 0B
            0C 19 41 75 74 68 65 6E 74 69 63 61 74 6F 72 20
            41 74 74 65 73 74 61 74 69 6F 6E 31 28 30 26 06
            03 55 04 03 0C 1F 59 75 62 69 63 6F 20 55 32 46
            20 45 45 20 53 65 72 69 61 6C 20 31 39 35 35 30
            30 33 38 34 32 30 59 30 13 06 07 2A 86 48 CE 3D
            02 01 06 08 2A 86 48 CE 3D 03 01 07 03 42 00 04
            95 5D F3 AD F7 24 7D 31 75 EF FD 9C C4 F3 1A 4E
            87 8E BA E1 81 09 56 61 50 FB 38 8B 2E 5F 65 27
            BF 57 40 9A A5 81 A5 0D 0A C5 2F 18 44 5C 0A 13
            54 8A 13 53 C8 A4 E5 9A 70 4E 52 3B C0 4D EB ED
            A3 6C 30 6A 30 22 06 09 2B 06 01 04 01 82 C4 0A
            02 04 15 31 2E 33 2E 36 2E 31 2E 34 2E 31 2E 34
            31 34 38 32 2E 31 2E 31 30 13 06 0B 2B 06 01 04
            01 82 E5 1C 02 01 01 04 04 03 02 05 20 30 21 06
            0B 2B 06 01 04 01 82 E5 1C 01 01 04 04 12 04 10
            F8 A0 11 F3 8C 0A 4D 15 80 06 17 11 1F 9E DC 7D
            30 0C 06 03 55 1D 13 01 01 FF 04 02 30 00 30 0D
            06 09 2A 86 48 86 F7 0D 01 01 0B 05 00 03 82 01
            01 00 31 5C 48 80 E6 9A 52 7E 38 66 89 BD 69 FD
            0A A8 6F 49 EB 9E 4E 85 45 41 55 6F AA D0 0B 3A
            00 8A 1D DC 01 F9 6C 76 F6 68 36 1A 91 E2 32 C8
            10 A7 9C 63 07 4C 9B 6E 7A 46 EB 1D B5 D8 5C 44
            48 9F 86 8A 76 43 D2 2A 5C 86 2E C0 3F 03 E5 84
            8B E3 80 7D 7A CD 55 F8 E1 AE 1E E2 13 AC 73 AB
            4B 20 E3 FB D5 26 8C B0 7B 87 80 27 1D 1F 4B E0
            E5 DD AC 73 4D 3A 58 97 BD 4D 73 BA 7F 35 7E A2
            08 C9 9D 8A 4D 29 02 E6 09 7A 00 5C 4D C9 04 DC
            0A 18 12 0E 0A F7 D0 0C FC 96 9A 28 86 E5 B1 B1
            61 F3 ED CB C6 77 A6 78 D7 FB 53 03 9C CD A1 86
            BE 34 BA 53 31 95 23 43 9D 7F D9 4A 70 F2 30 62
            1B 93 C4 CE 42 68 D3 17 4D 94 3B C6 AE 3F C9 37
            C2 DE 43 D6 B4 4E 21 15 3D F8 50 92 5F 95 90 62
            2E BC 46 E0 EB 18 C6 41 F0 FE 7E 6F 2A 09 A9 B2
            90 77 19 F6 2E 61 35 A1 90 32 A2 13 C0 98 B7 28
            3C EE 68 61 75 74 68 44 61 74 61 58 C4 95 69 08
            8F 1E CE E3 23 29 54 03 5D BD 10 D7 CA E3 91 30
            5A 27 51 B5 59 BB 8F D7 CB B2 29 BD D4 41 00 00
            00 00 F8 A0 11 F3 8C 0A 4D 15 80 06 17 11 1F 9E
            DC 7D 00 40 72 88 41 30 DF 30 E1 5B A4 F9 1F 24
            18 C3 2D 07 B8 F0 94 C0 16 E4 39 D9 95 46 24 88
            A2 CD 87 FD 2E B7 41 AB 03 6C 38 13 2A 81 58 B6
            F2 EE 0B 09 49 BE 69 8D 15 0F 17 D0 5C E7 49 91
            D3 AD 5E B2 A5 01 02 03 26 20 01 21 58 20 4E 8C
            DB 14 A7 6E 69 EB DE C0 F0 D5 4E A7 A1 2E 10 EA
            B9 04 CB BC 1C CD 0B E3 0A 29 F2 9A 72 C8 22 58
            20 C6 C8 7E 93 6E 2A AD BE 56 B3 F1 0B 23 60 75
            83 26 BD 88 B4 6F 74 CA 66 F5 27 0C 33 88 8E 9C
            80,
    },
}

Sending Message to Server:
>>>>>>>>>>>>>>>>
{"rawId":"cohBMN8w4Vuk-R8kGMMtB7jwlMAW5DnZlUYkiKLNh_0ut0GrA2w4EyqBWLby7gsJSb5pjRUPF9Bc50mR061esg","id":"cohBMN8w4Vuk-R8kGMMtB7jwlMAW5DnZlUYkiKLNh_0ut0GrA2w4EyqBWLby7gsJSb5pjRUPF9Bc50mR061esg","response":{"clientDataJSON":"eyJjaGFsbGVuZ2UiOiJSVk1qekFreEVZT2djeGFPTEd0MFEtQW1ySS1ISW1ndzBFTnhYSVlCajBNWW1EWjROQjhlbTY1VWdHblF5LXRzZ1hKOFhyaTJsVUh3bndHcnFpZl9OZyIsIm5ld19rZXlzX21heV9iZV9hZGRlZF9oZXJlIjoiZG8gbm90IGNvbXBhcmUgY2xpZW50RGF0YUpTT04gYWdhaW5zdCBhIHRlbXBsYXRlLiBTZWUgaHR0cHM6Ly9nb28uZ2wveWFiUGV4Iiwib3JpZ2luIjoiaHR0cHM6Ly93ZWJhdXRobi5vcmciLCJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIn0","attestationObject":"o2NmbXRmcGFja2VkZ2F0dFN0bXSjY2FsZyZjc2lnWEgwRgIhAP8v1SdTIcrh-vT5KC9qD6BNUPIVqBDyECiXnus3dCj8AiEAtXVujC7sbtiMALcsIvPsXGzBgTpmmBO2zivI62F68YxjeDVjgVkCwjCCAr4wggGmoAMCAQICBHSG_cIwDQYJKoZIhvcNAQELBQAwLjEsMCoGA1UEAxMjWXViaWNvIFUyRiBSb290IENBIFNlcmlhbCA0NTcyMDA2MzEwIBcNMTQwODAxMDAwMDAwWhgPMjA1MDA5MDQwMDAwMDBaMG8xCzAJBgNVBAYTAlNFMRIwEAYDVQQKDAlZdWJpY28gQUIxIjAgBgNVBAsMGUF1dGhlbnRpY2F0b3IgQXR0ZXN0YXRpb24xKDAmBgNVBAMMH1l1YmljbyBVMkYgRUUgU2VyaWFsIDE5NTUwMDM4NDIwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASVXfOt9yR9MXXv_ZzE8xpOh4664YEJVmFQ-ziLLl9lJ79XQJqlgaUNCsUvGERcChNUihNTyKTlmnBOUjvATevto2wwajAiBgkrBgEEAYLECgIEFTEuMy42LjEuNC4xLjQxNDgyLjEuMTATBgsrBgEEAYLlHAIBAQQEAwIFIDAhBgsrBgEEAYLlHAEBBAQSBBD4oBHzjApNFYAGFxEfntx9MAwGA1UdEwEB_wQCMAAwDQYJKoZIhvcNAQELBQADggEBADFcSIDmmlJ-OGaJvWn9CqhvSeueToVFQVVvqtALOgCKHdwB-Wx29mg2GpHiMsgQp5xjB0ybbnpG6x212FxESJ-GinZD0ipchi7APwPlhIvjgH16zVX44a4e4hOsc6tLIOP71SaMsHuHgCcdH0vg5d2sc006WJe9TXO6fzV-ogjJnYpNKQLmCXoAXE3JBNwKGBIOCvfQDPyWmiiG5bGxYfPty8Z3pnjX-1MDnM2hhr40ulMxlSNDnX_ZSnDyMGIbk8TOQmjTF02UO8auP8k3wt5D1rROIRU9-FCSX5WQYi68RuDrGMZB8P5-byoJqbKQdxn2LmE1oZAyohPAmLcoPO5oYXV0aERhdGFYxJVpCI8ezuMjKVQDXb0Q18rjkTBaJ1G1WbuP18uyKb3UQQAAAAD4oBHzjApNFYAGFxEfntx9AEByiEEw3zDhW6T5HyQYwy0HuPCUwBbkOdmVRiSIos2H_S63QasDbDgTKoFYtvLuCwlJvmmNFQ8X0FznSZHTrV6ypQECAyYgASFYIE6M2xSnbmnr3sDw1U6noS4Q6rkEy7wczQvjCinymnLIIlggxsh-k24qrb5Ws_ELI2B1gya9iLRvdMpm9ScMM4iOnIA"}}
>>>>>>>>>>>>>>>>

Received Message from Server:
<<<<<<<< [ STATUS 200 ] <<<<<<<<
{"status":"ok","errorMessage":"","debugInfo":{"clientData":{"challenge":"RVMjzAkxEYOgcxaOLGt0Q-AmrI-HImgw0ENxXIYBj0MYmDZ4NB8em65UgGnQy-tsgXJ8Xri2lUHwnwGrqif_Ng","origin":"https://webauthn.org","type":"webauthn.create","rawClientDataJson":"{\"challenge\":\"RVMjzAkxEYOgcxaOLGt0Q-AmrI-HImgw0ENxXIYBj0MYmDZ4NB8em65UgGnQy-tsgXJ8Xri2lUHwnwGrqif_Ng\",\"new_keys_may_be_added_here\":\"do not compare clientDataJSON against a template. See https://goo.gl/yabPex\",\"origin\":\"https://webauthn.org\",\"type\":\"webauthn.create\"}","rawId":"cohBMN8w4Vuk-R8kGMMtB7jwlMAW5DnZlUYkiKLNh_0ut0GrA2w4EyqBWLby7gsJSb5pjRUPF9Bc50mR061esg"},"authnrData":{"fmt":"packed","alg":{"algName":"ECDSA_w_SHA256","hashAlg":"SHA256"},"attCert":"MIICvjCCAaagAwIBAgIEdIb9wjANBgkqhkiG9w0BAQsFADAuMSwwKgYDVQQDEyNZdWJpY28gVTJGIFJvb3QgQ0EgU2VyaWFsIDQ1NzIwMDYzMTAgFw0xNDA4MDEwMDAwMDBaGA8yMDUwMDkwNDAwMDAwMFowbzELMAkGA1UEBhMCU0UxEjAQBgNVBAoMCVl1YmljbyBBQjEiMCAGA1UECwwZQXV0aGVudGljYXRvciBBdHRlc3RhdGlvbjEoMCYGA1UEAwwfWXViaWNvIFUyRiBFRSBTZXJpYWwgMTk1NTAwMzg0MjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABJVd8633JH0xde_9nMTzGk6HjrrhgQlWYVD7OIsuX2Unv1dAmqWBpQ0KxS8YRFwKE1SKE1PIpOWacE5SO8BN6-2jbDBqMCIGCSsGAQQBgsQKAgQVMS4zLjYuMS40LjEuNDE0ODIuMS4xMBMGCysGAQQBguUcAgEBBAQDAgUgMCEGCysGAQQBguUcAQEEBBIEEPigEfOMCk0VgAYXER-e3H0wDAYDVR0TAQH_BAIwADANBgkqhkiG9w0BAQsFAAOCAQEAMVxIgOaaUn44Zom9af0KqG9J655OhUVBVW-q0As6AIod3AH5bHb2aDYakeIyyBCnnGMHTJtuekbrHbXYXERIn4aKdkPSKlyGLsA_A-WEi-OAfXrNVfjhrh7iE6xzq0sg4_vVJoywe4eAJx0fS-Dl3axzTTpYl71Nc7p_NX6iCMmdik0pAuYJegBcTckE3AoYEg4K99AM_JaaKIblsbFh8-3LxnemeNf7UwOczaGGvjS6UzGVI0Odf9lKcPIwYhuTxM5CaNMXTZQ7xq4_yTfC3kPWtE4hFT34UJJflZBiLrxG4OsYxkHw_n5vKgmpspB3GfYuYTWhkDKiE8CYtyg87g","x5c":[],"sig":"MEYCIQD_L9UnUyHK4fr0-Sgvag-gTVDyFagQ8hAol57rN3Qo_AIhALV1bowu7G7YjAC3LCLz7FxswYE6ZpgTts4ryOthevGM","rawAuthnrData":"lWkIjx7O4yMpVANdvRDXyuORMFonUbVZu4_Xy7IpvdRBAAAAAPigEfOMCk0VgAYXER-e3H0AQHKIQTDfMOFbpPkfJBjDLQe48JTAFuQ52ZVGJIiizYf9LrdBqwNsOBMqgVi28u4LCUm-aY0VDxfQXOdJkdOtXrKlAQIDJiABIVggTozbFKduaevewPDVTqehLhDquQTLvBzNC-MKKfKacsgiWCDGyH6Tbiqtvlaz8QsjYHWDJr2ItG90ymb1JwwziI6cgA","rpIdHash":"lWkIjx7O4yMpVANdvRDXyuORMFonUbVZu4_Xy7IpvdQ","flags":["UP","AT"],"counter":0,"aaguid":"-KAR84wKTRWABhcRH57cfQ","credIdLen":64,"credId":"cohBMN8w4Vuk-R8kGMMtB7jwlMAW5DnZlUYkiKLNh_0ut0GrA2w4EyqBWLby7gsJSb5pjRUPF9Bc50mR061esg","credentialPublicKeyCose":"pQECAyYgASFYIE6M2xSnbmnr3sDw1U6noS4Q6rkEy7wczQvjCinymnLIIlggxsh-k24qrb5Ws_ELI2B1gya9iLRvdMpm9ScMM4iOnIA","credentialPublicKeyJwk":{"kty":"EC","alg":"ECDSA_w_SHA256","crv":"P-256","x":"TozbFKduaevewPDVTqehLhDquQTLvBzNC+MKKfKacsg=","y":"xsh+k24qrb5Ws/ELI2B1gya9iLRvdMpm9ScMM4iOnIA="},"credentialPublicKeyPem":"-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAETozbFKduaevewPDVTqehLhDquQTL\nvBzNC+MKKfKacsjGyH6Tbiqtvlaz8QsjYHWDJr2ItG90ymb1JwwziI6cgA==\n-----END PUBLIC KEY-----\n"},"audit":{"validExpectations":true,"validRequest":true,"complete":true,"warning":{},"info":{"yubico-device-id":"Security Key by Yubico","fido-u2f-transports":["usb"],"fido-aaguid":{},"basic-constraints":{},"attestation-type":"basic"}}}}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

[ServerResponse] {
    status: "ok",
    errorMessage: "",
    debugInfo: {
        clientData: {
            challenge: "RVMjzAkxEYOgcxaOLGt0Q-AmrI-HImgw0ENxXIYBj0MYmDZ4NB8em65UgGnQy-tsgXJ8Xri2lUHwnwGrqif_Ng",
            origin: "https://webauthn.org",
            type: "webauthn.create",
            rawClientDataJson: [ArrayBuffer] (266 bytes)
                7B 22 63 68 61 6C 6C 65 6E 67 65 22 3A 22 52 56
                4D 6A 7A 41 6B 78 45 59 4F 67 63 78 61 4F 4C 47
                74 30 51 2D 41 6D 72 49 2D 48 49 6D 67 77 30 45
                4E 78 58 49 59 42 6A 30 4D 59 6D 44 5A 34 4E 42
                38 65 6D 36 35 55 67 47 6E 51 79 2D 74 73 67 58
                4A 38 58 72 69 32 6C 55 48 77 6E 77 47 72 71 69
                66 5F 4E 67 22 2C 22 6E 65 77 5F 6B 65 79 73 5F
                6D 61 79 5F 62 65 5F 61 64 64 65 64 5F 68 65 72
                65 22 3A 22 64 6F 20 6E 6F 74 20 63 6F 6D 70 61
                72 65 20 63 6C 69 65 6E 74 44 61 74 61 4A 53 4F
                4E 20 61 67 61 69 6E 73 74 20 61 20 74 65 6D 70
                6C 61 74 65 2E 20 53 65 65 20 68 74 74 70 73 3A
                2F 2F 67 6F 6F 2E 67 6C 2F 79 61 62 50 65 78 22
                2C 22 6F 72 69 67 69 6E 22 3A 22 68 74 74 70 73
                3A 2F 2F 77 65 62 61 75 74 68 6E 2E 6F 72 67 22
                2C 22 74 79 70 65 22 3A 22 77 65 62 61 75 74 68
                6E 2E 63 72 65 61 74 65 22 7D,
            rawId: [ArrayBuffer] (64 bytes)
                72 88 41 30 DF 30 E1 5B A4 F9 1F 24 18 C3 2D 07
                B8 F0 94 C0 16 E4 39 D9 95 46 24 88 A2 CD 87 FD
                2E B7 41 AB 03 6C 38 13 2A 81 58 B6 F2 EE 0B 09
                49 BE 69 8D 15 0F 17 D0 5C E7 49 91 D3 AD 5E B2,
        },
        authnrData: {
            fmt: "packed",
            alg: {
                algName: "ECDSA_w_SHA256",
                hashAlg: "SHA256",
            },
            attCert: [ArrayBuffer] (706 bytes)
                30 82 02 BE 30 82 01 A6 A0 03 02 01 02 02 04 74
                86 FD C2 30 0D 06 09 2A 86 48 86 F7 0D 01 01 0B
                05 00 30 2E 31 2C 30 2A 06 03 55 04 03 13 23 59
                75 62 69 63 6F 20 55 32 46 20 52 6F 6F 74 20 43
                41 20 53 65 72 69 61 6C 20 34 35 37 32 30 30 36
                33 31 30 20 17 0D 31 34 30 38 30 31 30 30 30 30
                30 30 5A 18 0F 32 30 35 30 30 39 30 34 30 30 30
                30 30 30 5A 30 6F 31 0B 30 09 06 03 55 04 06 13
                02 53 45 31 12 30 10 06 03 55 04 0A 0C 09 59 75
                62 69 63 6F 20 41 42 31 22 30 20 06 03 55 04 0B
                0C 19 41 75 74 68 65 6E 74 69 63 61 74 6F 72 20
                41 74 74 65 73 74 61 74 69 6F 6E 31 28 30 26 06
                03 55 04 03 0C 1F 59 75 62 69 63 6F 20 55 32 46
                20 45 45 20 53 65 72 69 61 6C 20 31 39 35 35 30
                30 33 38 34 32 30 59 30 13 06 07 2A 86 48 CE 3D
                02 01 06 08 2A 86 48 CE 3D 03 01 07 03 42 00 04
                95 5D F3 AD F7 24 7D 31 75 EF FD 9C C4 F3 1A 4E
                87 8E BA E1 81 09 56 61 50 FB 38 8B 2E 5F 65 27
                BF 57 40 9A A5 81 A5 0D 0A C5 2F 18 44 5C 0A 13
                54 8A 13 53 C8 A4 E5 9A 70 4E 52 3B C0 4D EB ED
                A3 6C 30 6A 30 22 06 09 2B 06 01 04 01 82 C4 0A
                02 04 15 31 2E 33 2E 36 2E 31 2E 34 2E 31 2E 34
                31 34 38 32 2E 31 2E 31 30 13 06 0B 2B 06 01 04
                01 82 E5 1C 02 01 01 04 04 03 02 05 20 30 21 06
                0B 2B 06 01 04 01 82 E5 1C 01 01 04 04 12 04 10
                F8 A0 11 F3 8C 0A 4D 15 80 06 17 11 1F 9E DC 7D
                30 0C 06 03 55 1D 13 01 01 FF 04 02 30 00 30 0D
                06 09 2A 86 48 86 F7 0D 01 01 0B 05 00 03 82 01
                01 00 31 5C 48 80 E6 9A 52 7E 38 66 89 BD 69 FD
                0A A8 6F 49 EB 9E 4E 85 45 41 55 6F AA D0 0B 3A
                00 8A 1D DC 01 F9 6C 76 F6 68 36 1A 91 E2 32 C8
                10 A7 9C 63 07 4C 9B 6E 7A 46 EB 1D B5 D8 5C 44
                48 9F 86 8A 76 43 D2 2A 5C 86 2E C0 3F 03 E5 84
                8B E3 80 7D 7A CD 55 F8 E1 AE 1E E2 13 AC 73 AB
                4B 20 E3 FB D5 26 8C B0 7B 87 80 27 1D 1F 4B E0
                E5 DD AC 73 4D 3A 58 97 BD 4D 73 BA 7F 35 7E A2
                08 C9 9D 8A 4D 29 02 E6 09 7A 00 5C 4D C9 04 DC
                0A 18 12 0E 0A F7 D0 0C FC 96 9A 28 86 E5 B1 B1
                61 F3 ED CB C6 77 A6 78 D7 FB 53 03 9C CD A1 86
                BE 34 BA 53 31 95 23 43 9D 7F D9 4A 70 F2 30 62
                1B 93 C4 CE 42 68 D3 17 4D 94 3B C6 AE 3F C9 37
                C2 DE 43 D6 B4 4E 21 15 3D F8 50 92 5F 95 90 62
                2E BC 46 E0 EB 18 C6 41 F0 FE 7E 6F 2A 09 A9 B2
                90 77 19 F6 2E 61 35 A1 90 32 A2 13 C0 98 B7 28
                3C EE,
            x5c: [
            ],
            sig: [ArrayBuffer] (72 bytes)
                30 46 02 21 00 FF 2F D5 27 53 21 CA E1 FA F4 F9
                28 2F 6A 0F A0 4D 50 F2 15 A8 10 F2 10 28 97 9E
                EB 37 74 28 FC 02 21 00 B5 75 6E 8C 2E EC 6E D8
                8C 00 B7 2C 22 F3 EC 5C 6C C1 81 3A 66 98 13 B6
                CE 2B C8 EB 61 7A F1 8C,
            rawAuthnrData: [ArrayBuffer] (196 bytes)
                95 69 08 8F 1E CE E3 23 29 54 03 5D BD 10 D7 CA
                E3 91 30 5A 27 51 B5 59 BB 8F D7 CB B2 29 BD D4
                41 00 00 00 00 F8 A0 11 F3 8C 0A 4D 15 80 06 17
                11 1F 9E DC 7D 00 40 72 88 41 30 DF 30 E1 5B A4
                F9 1F 24 18 C3 2D 07 B8 F0 94 C0 16 E4 39 D9 95
                46 24 88 A2 CD 87 FD 2E B7 41 AB 03 6C 38 13 2A
                81 58 B6 F2 EE 0B 09 49 BE 69 8D 15 0F 17 D0 5C
                E7 49 91 D3 AD 5E B2 A5 01 02 03 26 20 01 21 58
                20 4E 8C DB 14 A7 6E 69 EB DE C0 F0 D5 4E A7 A1
                2E 10 EA B9 04 CB BC 1C CD 0B E3 0A 29 F2 9A 72
                C8 22 58 20 C6 C8 7E 93 6E 2A AD BE 56 B3 F1 0B
                23 60 75 83 26 BD 88 B4 6F 74 CA 66 F5 27 0C 33
                88 8E 9C 80,
            rpIdHash: [ArrayBuffer] (32 bytes)
                95 69 08 8F 1E CE E3 23 29 54 03 5D BD 10 D7 CA
                E3 91 30 5A 27 51 B5 59 BB 8F D7 CB B2 29 BD D4,
            flags: [
                "UP",
                "AT",
            ],
            counter: 0,
            aaguid: [ArrayBuffer] (16 bytes)
                F8 A0 11 F3 8C 0A 4D 15 80 06 17 11 1F 9E DC 7D,
            credIdLen: 64,
            credId: [ArrayBuffer] (64 bytes)
                72 88 41 30 DF 30 E1 5B A4 F9 1F 24 18 C3 2D 07
                B8 F0 94 C0 16 E4 39 D9 95 46 24 88 A2 CD 87 FD
                2E B7 41 AB 03 6C 38 13 2A 81 58 B6 F2 EE 0B 09
                49 BE 69 8D 15 0F 17 D0 5C E7 49 91 D3 AD 5E B2,
            credentialPublicKeyCose: [ArrayBuffer] (77 bytes)
                A5 01 02 03 26 20 01 21 58 20 4E 8C DB 14 A7 6E
                69 EB DE C0 F0 D5 4E A7 A1 2E 10 EA B9 04 CB BC
                1C CD 0B E3 0A 29 F2 9A 72 C8 22 58 20 C6 C8 7E
                93 6E 2A AD BE 56 B3 F1 0B 23 60 75 83 26 BD 88
                B4 6F 74 CA 66 F5 27 0C 33 88 8E 9C 80,
            credentialPublicKeyJwk: {
                kty: "EC",
                alg: "ECDSA_w_SHA256",
                crv: "P-256",
                x: "TozbFKduaevewPDVTqehLhDquQTLvBzNC+MKKfKacsg=",
                y: "xsh+k24qrb5Ws/ELI2B1gya9iLRvdMpm9ScMM4iOnIA=",
            },
            credentialPublicKeyPem: "-----BEGIN PUBLIC KEY-----
                MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAETozbFKduaevewPDVTqehLhDquQTL
                vBzNC+MKKfKacsjGyH6Tbiqtvlaz8QsjYHWDJr2ItG90ymb1JwwziI6cgA==
                -----END PUBLIC KEY-----
                ",
        },
        audit: {
            validExpectations: true,
            validRequest: true,
            complete: true,
            warning: {
            },
            info: {
                yubico-device-id: "Security Key by Yubico",
                fido-u2f-transports: [
                    "usb",
                ],
                fido-aaguid: {
                },
                basic-constraints: {
                },
                attestation-type: "basic",
            },
        },
    },
}
REGISTRATION SUCCESS.
REGISTER DONE.

3. Log in With YubiKey

LOGIN START:

Sending Message to Server:
>>>>>>>>>>>>>>>>
{"username":"miliya","displayName":"miliya"}
>>>>>>>>>>>>>>>>

Received Message from Server:
<<<<<<<< [ STATUS 200 ] <<<<<<<<
{"status":"ok","errorMessage":"","challenge":"Kh_un4F0lyKjWuqg3Mg4gek21SGcsWlrjyh2502LdVFQrsQd72oeN0xRbd1kGtgXwXVg7qB03RviJlms0BiSYQ","timeout":60000,"allowCredentials":[{"id":"cohBMN8w4Vuk-R8kGMMtB7jwlMAW5DnZlUYkiKLNh_0ut0GrA2w4EyqBWLby7gsJSb5pjRUPF9Bc50mR061esg","type":"public-key"}]}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

WebAuthn navigator.credentials.get() options:
[GetOptions] {
    challenge: [ArrayBuffer] (64 bytes)
        2A 1F EE 9F 81 74 97 22 A3 5A EA A0 DC C8 38 81
        E9 36 D5 21 9C B1 69 6B 8F 28 76 E7 4D 8B 75 51
        50 AE C4 1D EF 6A 1E 37 4C 51 6D DD 64 1A D8 17
        C1 75 60 EE A0 74 DD 1B E2 26 59 AC D0 18 92 61,
    timeout: 60000,
    allowCredentials: [
        {
            id: [ArrayBuffer] (64 bytes)
                72 88 41 30 DF 30 E1 5B A4 F9 1F 24 18 C3 2D 07
                B8 F0 94 C0 16 E4 39 D9 95 46 24 88 A2 CD 87 FD
                2E B7 41 AB 03 6C 38 13 2A 81 58 B6 F2 EE 0B 09
                49 BE 69 8D 15 0F 17 D0 5C E7 49 91 D3 AD 5E B2,
            type: "public-key",
        },
    ],
}
WAITING FOR USER PRESENCE...
USER PRESENCE DONE.
WebAuthn navigator.credentials.get() result:
[CredentialAssertion] {
    rawId: [ArrayBuffer] (64 bytes)
        72 88 41 30 DF 30 E1 5B A4 F9 1F 24 18 C3 2D 07
        B8 F0 94 C0 16 E4 39 D9 95 46 24 88 A2 CD 87 FD
        2E B7 41 AB 03 6C 38 13 2A 81 58 B6 F2 EE 0B 09
        49 BE 69 8D 15 0F 17 D0 5C E7 49 91 D3 AD 5E B2,
    id: [ArrayBuffer] (64 bytes)
        72 88 41 30 DF 30 E1 5B A4 F9 1F 24 18 C3 2D 07
        B8 F0 94 C0 16 E4 39 D9 95 46 24 88 A2 CD 87 FD
        2E B7 41 AB 03 6C 38 13 2A 81 58 B6 F2 EE 0B 09
        49 BE 69 8D 15 0F 17 D0 5C E7 49 91 D3 AD 5E B2,
    response: {
        clientDataJSON: [ArrayBuffer] (263 bytes)
            7B 22 63 68 61 6C 6C 65 6E 67 65 22 3A 22 4B 68
            5F 75 6E 34 46 30 6C 79 4B 6A 57 75 71 67 33 4D
            67 34 67 65 6B 32 31 53 47 63 73 57 6C 72 6A 79
            68 32 35 30 32 4C 64 56 46 51 72 73 51 64 37 32
            6F 65 4E 30 78 52 62 64 31 6B 47 74 67 58 77 58
            56 67 37 71 42 30 33 52 76 69 4A 6C 6D 73 30 42
            69 53 59 51 22 2C 22 6E 65 77 5F 6B 65 79 73 5F
            6D 61 79 5F 62 65 5F 61 64 64 65 64 5F 68 65 72
            65 22 3A 22 64 6F 20 6E 6F 74 20 63 6F 6D 70 61
            72 65 20 63 6C 69 65 6E 74 44 61 74 61 4A 53 4F
            4E 20 61 67 61 69 6E 73 74 20 61 20 74 65 6D 70
            6C 61 74 65 2E 20 53 65 65 20 68 74 74 70 73 3A
            2F 2F 67 6F 6F 2E 67 6C 2F 79 61 62 50 65 78 22
            2C 22 6F 72 69 67 69 6E 22 3A 22 68 74 74 70 73
            3A 2F 2F 77 65 62 61 75 74 68 6E 2E 6F 72 67 22
            2C 22 74 79 70 65 22 3A 22 77 65 62 61 75 74 68
            6E 2E 67 65 74 22 7D,
        authenticatorData: [ArrayBuffer] (37 bytes)
            95 69 08 8F 1E CE E3 23 29 54 03 5D BD 10 D7 CA
            E3 91 30 5A 27 51 B5 59 BB 8F D7 CB B2 29 BD D4
            01 00 00 00 01,
        signature: [ArrayBuffer] (71 bytes)
            30 45 02 21 00 9A 6E BB 07 7A 1D 6A 48 4D CE B9
            15 14 17 8C 32 EF 3D 8C A3 99 28 04 B7 C8 71 53
            F2 63 5F 28 B5 02 20 74 17 7E 5C 15 FF E1 6A A9
            89 55 BB 88 BD 85 C0 FA 0D E5 E2 32 CF C2 57 DC
            A7 94 4A 87 14 41 2C,
        userHandle: [ArrayBuffer] (0 bytes),
    },
}

Sending Message to Server:
>>>>>>>>>>>>>>>>
{"rawId":"cohBMN8w4Vuk-R8kGMMtB7jwlMAW5DnZlUYkiKLNh_0ut0GrA2w4EyqBWLby7gsJSb5pjRUPF9Bc50mR061esg","id":"cohBMN8w4Vuk-R8kGMMtB7jwlMAW5DnZlUYkiKLNh_0ut0GrA2w4EyqBWLby7gsJSb5pjRUPF9Bc50mR061esg","response":{"clientDataJSON":"eyJjaGFsbGVuZ2UiOiJLaF91bjRGMGx5S2pXdXFnM01nNGdlazIxU0djc1dscmp5aDI1MDJMZFZGUXJzUWQ3Mm9lTjB4UmJkMWtHdGdYd1hWZzdxQjAzUnZpSmxtczBCaVNZUSIsIm5ld19rZXlzX21heV9iZV9hZGRlZF9oZXJlIjoiZG8gbm90IGNvbXBhcmUgY2xpZW50RGF0YUpTT04gYWdhaW5zdCBhIHRlbXBsYXRlLiBTZWUgaHR0cHM6Ly9nb28uZ2wveWFiUGV4Iiwib3JpZ2luIjoiaHR0cHM6Ly93ZWJhdXRobi5vcmciLCJ0eXBlIjoid2ViYXV0aG4uZ2V0In0","authenticatorData":"lWkIjx7O4yMpVANdvRDXyuORMFonUbVZu4_Xy7IpvdQBAAAAAQ","signature":"MEUCIQCabrsHeh1qSE3OuRUUF4wy7z2Mo5koBLfIcVPyY18otQIgdBd-XBX_4WqpiVW7iL2FwPoN5eIyz8JX3KeUSocUQSw","userHandle":null}}
>>>>>>>>>>>>>>>>

Received Message from Server:
<<<<<<<< [ STATUS 200 ] <<<<<<<<
{"status":"ok","errorMessage":"","debugInfo":{"clientData":{"challenge":"Kh_un4F0lyKjWuqg3Mg4gek21SGcsWlrjyh2502LdVFQrsQd72oeN0xRbd1kGtgXwXVg7qB03RviJlms0BiSYQ","origin":"https://webauthn.org","type":"webauthn.get","rawClientDataJson":"{\"challenge\":\"Kh_un4F0lyKjWuqg3Mg4gek21SGcsWlrjyh2502LdVFQrsQd72oeN0xRbd1kGtgXwXVg7qB03RviJlms0BiSYQ\",\"new_keys_may_be_added_here\":\"do not compare clientDataJSON against a template. See https://goo.gl/yabPex\",\"origin\":\"https://webauthn.org\",\"type\":\"webauthn.get\"}","rawId":"cohBMN8w4Vuk-R8kGMMtB7jwlMAW5DnZlUYkiKLNh_0ut0GrA2w4EyqBWLby7gsJSb5pjRUPF9Bc50mR061esg"},"authnrData":{"sig":"MEUCIQCabrsHeh1qSE3OuRUUF4wy7z2Mo5koBLfIcVPyY18otQIgdBd-XBX_4WqpiVW7iL2FwPoN5eIyz8JX3KeUSocUQSw","rawAuthnrData":"lWkIjx7O4yMpVANdvRDXyuORMFonUbVZu4_Xy7IpvdQBAAAAAQ","rpIdHash":"lWkIjx7O4yMpVANdvRDXyuORMFonUbVZu4_Xy7IpvdQ","flags":["UP"],"counter":1},"audit":{"validExpectations":true,"validRequest":true,"complete":true,"warning":{},"info":{}}}}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

[ServerResponse] {
    status: "ok",
    errorMessage: "",
    debugInfo: {
        clientData: {
            challenge: "Kh_un4F0lyKjWuqg3Mg4gek21SGcsWlrjyh2502LdVFQrsQd72oeN0xRbd1kGtgXwXVg7qB03RviJlms0BiSYQ",
            origin: "https://webauthn.org",
            type: "webauthn.get",
            rawClientDataJson: [ArrayBuffer] (263 bytes)
                7B 22 63 68 61 6C 6C 65 6E 67 65 22 3A 22 4B 68
                5F 75 6E 34 46 30 6C 79 4B 6A 57 75 71 67 33 4D
                67 34 67 65 6B 32 31 53 47 63 73 57 6C 72 6A 79
                68 32 35 30 32 4C 64 56 46 51 72 73 51 64 37 32
                6F 65 4E 30 78 52 62 64 31 6B 47 74 67 58 77 58
                56 67 37 71 42 30 33 52 76 69 4A 6C 6D 73 30 42
                69 53 59 51 22 2C 22 6E 65 77 5F 6B 65 79 73 5F
                6D 61 79 5F 62 65 5F 61 64 64 65 64 5F 68 65 72
                65 22 3A 22 64 6F 20 6E 6F 74 20 63 6F 6D 70 61
                72 65 20 63 6C 69 65 6E 74 44 61 74 61 4A 53 4F
                4E 20 61 67 61 69 6E 73 74 20 61 20 74 65 6D 70
                6C 61 74 65 2E 20 53 65 65 20 68 74 74 70 73 3A
                2F 2F 67 6F 6F 2E 67 6C 2F 79 61 62 50 65 78 22
                2C 22 6F 72 69 67 69 6E 22 3A 22 68 74 74 70 73
                3A 2F 2F 77 65 62 61 75 74 68 6E 2E 6F 72 67 22
                2C 22 74 79 70 65 22 3A 22 77 65 62 61 75 74 68
                6E 2E 67 65 74 22 7D,
            rawId: [ArrayBuffer] (64 bytes)
                72 88 41 30 DF 30 E1 5B A4 F9 1F 24 18 C3 2D 07
                B8 F0 94 C0 16 E4 39 D9 95 46 24 88 A2 CD 87 FD
                2E B7 41 AB 03 6C 38 13 2A 81 58 B6 F2 EE 0B 09
                49 BE 69 8D 15 0F 17 D0 5C E7 49 91 D3 AD 5E B2,
        },
        authnrData: {
            sig: [ArrayBuffer] (71 bytes)
                30 45 02 21 00 9A 6E BB 07 7A 1D 6A 48 4D CE B9
                15 14 17 8C 32 EF 3D 8C A3 99 28 04 B7 C8 71 53
                F2 63 5F 28 B5 02 20 74 17 7E 5C 15 FF E1 6A A9
                89 55 BB 88 BD 85 C0 FA 0D E5 E2 32 CF C2 57 DC
                A7 94 4A 87 14 41 2C,
            rawAuthnrData: [ArrayBuffer] (37 bytes)
                95 69 08 8F 1E CE E3 23 29 54 03 5D BD 10 D7 CA
                E3 91 30 5A 27 51 B5 59 BB 8F D7 CB B2 29 BD D4
                01 00 00 00 01,
            rpIdHash: [ArrayBuffer] (32 bytes)
                95 69 08 8F 1E CE E3 23 29 54 03 5D BD 10 D7 CA
                E3 91 30 5A 27 51 B5 59 BB 8F D7 CB B2 29 BD D4,
            flags: [
                "UP",
            ],
            counter: 1,
        },
        audit: {
            validExpectations: true,
            validRequest: true,
            complete: true,
            warning: {
            },
            info: {
            },
        },
    },
}
LOGIN SUCCESS.
LOGIN DONE.

4. Log in with incorrect username

LOGIN START:

Sending Message to Server:
>>>>>>>>>>>>>>>>
{"username":"miliya6","displayName":"miliya6"}
>>>>>>>>>>>>>>>>

Received Message from Server:
<<<<<<<< [ STATUS 400 ] <<<<<<<<
{"status":"failed","errorMessage":"login failed: error finding user: miliya6"}
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Error: login failed: error finding user: miliya6
Login error: Error: login failed: error finding user: miliya6
LOGIN DONE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment