summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2020-05-22 15:49:02 -0700
committerMatthew Miller <matthew@millerti.me>2020-05-22 15:49:02 -0700
commitf50caf6422d0030f4109b6174bb0b21e70ca0efa (patch)
treeb37a95b5bad4a1ef9da4c57173a3961cc436f051
parent78390a909b5c0ae0baccd6a607abc0261542576e (diff)
Add comments about what to store from attestation
-rw-r--r--example/index.js23
1 files changed, 17 insertions, 6 deletions
diff --git a/example/index.js b/example/index.js
index 149131a..a6a2364 100644
--- a/example/index.js
+++ b/example/index.js
@@ -32,12 +32,23 @@ const username = 'user@webauthntine.foo';
const inMemoryUserDeviceDB = {
[userId]: [
- {
- base64PublicKey: undefined,
- base64CredentialID: undefined,
- counter: -1,
- }
-],
+ /**
+ * After an attestation, the following authenticator info returned by
+ * verifyAttestationResponse() should be persisted somewhere that'll tie it back to the user
+ * specified during attestation:
+ *
+ * {
+ * base64PublicKey: string,
+ * base64CredentialID: string,
+ * counter: number,
+ * }
+ *
+ * After an assertion, the `counter` value above should be updated to the value returned by
+ * verifyAssertionResponse(). This method will also return a credential ID of the device that
+ * needs to have its `counter` value updated.
+ *
+ */
+ ],
};
/**