summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2020-05-26 22:49:41 -0700
committerMatthew Miller <matthew@millerti.me>2020-05-26 22:49:41 -0700
commitae261d3feb0b73d2d3eaa65401dddd521ca8fead (patch)
tree9455c952df42847464d829e6d1c8b5e7f5cb53c5
parentedca8a8ba7014118db5d4687e6069dbbc7be3e56 (diff)
Update example to v0.4.0
-rw-r--r--example/index.js24
-rw-r--r--example/package-lock.json14
-rw-r--r--example/package.json2
-rw-r--r--example/public/login/index.html2
-rw-r--r--example/public/register/index.html2
5 files changed, 22 insertions, 22 deletions
diff --git a/example/index.js b/example/index.js
index fb8c04f..4c3fdab 100644
--- a/example/index.js
+++ b/example/index.js
@@ -116,22 +116,22 @@ app.get('/generate-attestation-options', (req, res) => {
inMemoryUserDeviceDB[loggedInUserId].currentChallenge = challenge;
res.send(
- generateAttestationOptions(
- 'SimpleWebAuthn Example',
+ generateAttestationOptions({
+ serviceName: 'SimpleWebAuthn Example',
rpID,
challenge,
- loggedInUserId,
- username,
- 60000,
- 'direct',
+ userID: loggedInUserId,
+ userName: username,
+ timeout: 60000,
+ attestationType: 'direct',
/**
* Passing in a user's list of already-registered authenticator IDs here prevents users from
* registering the same device multiple times. The authenticator will simply throw an error in
* the browser if it's asked to perform an attestation when one of these ID's already resides
* on it.
*/
- devices.map(dev => dev.base64CredentialID),
- ),
+ excludedBase64CredentialIDs: devices.map(dev => dev.base64CredentialID),
+ }),
);
});
@@ -190,11 +190,11 @@ app.get('/generate-assertion-options', (req, res) => {
inMemoryUserDeviceDB[loggedInUserId].currentChallenge = challenge;
res.send(
- generateAssertionOptions(
+ generateAssertionOptions({
challenge,
- 60000,
- user.devices.map(data => data.base64CredentialID),
- ),
+ timeout: 60000,
+ allowedBase64CredentialIDs: user.devices.map(data => data.base64CredentialID),
+ }),
);
});
diff --git a/example/package-lock.json b/example/package-lock.json
index 56ed73e..0266733 100644
--- a/example/package-lock.json
+++ b/example/package-lock.json
@@ -5,11 +5,11 @@
"requires": true,
"dependencies": {
"@simplewebauthn/server": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/@simplewebauthn/server/-/server-0.3.0.tgz",
- "integrity": "sha512-R2V3G32zf5ug+vWP08B6/t1VQYRu2+wAhXl/U9BeDrSRqnDdAzlfrjZ8L42rcORhaihdj1Szh0KTXRauq6ffLg==",
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/@simplewebauthn/server/-/server-0.4.0.tgz",
+ "integrity": "sha512-wie2XWR5HSCGLdyzPlBak1+/H9bYp5FGS2lHQ4K9vXHYk7WzCNOaxgAEQ5JWfkRqBAbSYaHRclJoIalaWxmlKQ==",
"requires": {
- "@simplewebauthn/typescript-types": "^0.3.0",
+ "@simplewebauthn/typescript-types": "^0.4.0",
"base64url": "^3.0.1",
"cbor": "^5.0.2",
"elliptic": "^6.5.2",
@@ -18,9 +18,9 @@
}
},
"@simplewebauthn/typescript-types": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/@simplewebauthn/typescript-types/-/typescript-types-0.3.0.tgz",
- "integrity": "sha512-hI6+VCppl54jN04VJnT0dBJNKJbbm6NdVLEUVThpkdrCZQhdZxgtZqRpsuZM3poIXXzDhSkLCZicp4E7EpQ3lg=="
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/@simplewebauthn/typescript-types/-/typescript-types-0.4.0.tgz",
+ "integrity": "sha512-HZXT9QO7i73nyLv7eSon0tkbcfafnOKg4zv88yQOMmzanuq8dVngbYSNrh2lqVR9jSfpz4icYiBIU+bYvRV77Q=="
},
"@sindresorhus/is": {
"version": "0.14.0",
diff --git a/example/package.json b/example/package.json
index 155e72b..937ee50 100644
--- a/example/package.json
+++ b/example/package.json
@@ -10,7 +10,7 @@
"author": "",
"license": "ISC",
"dependencies": {
- "@simplewebauthn/server": "^0.3.0",
+ "@simplewebauthn/server": "^0.4.0",
"express": "^4.17.1"
},
"devDependencies": {
diff --git a/example/public/login/index.html b/example/public/login/index.html
index 5100f87..480efd6 100644
--- a/example/public/login/index.html
+++ b/example/public/login/index.html
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <script src="https://unpkg.com/@simplewebauthn/browser@0.3.0/dist/simplewebauthn-browser.min.js"></script>
+ <script src="https://unpkg.com/@simplewebauthn/browser@0.4.0/dist/simplewebauthn-browser.min.js"></script>
<link rel="stylesheet" href="../styles.css" />
<title>SimpleWebAuthn Example Site | Login</title>
</head>
diff --git a/example/public/register/index.html b/example/public/register/index.html
index 9eb788a..c8d6d7f 100644
--- a/example/public/register/index.html
+++ b/example/public/register/index.html
@@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <script src="https://unpkg.com/@simplewebauthn/browser@0.3.0/dist/simplewebauthn-browser.min.js"></script>
+ <script src="https://unpkg.com/@simplewebauthn/browser@0.4.0/dist/simplewebauthn-browser.min.js"></script>
<link rel="stylesheet" href="../styles.css" />
<title>SimpleWebAuthn Example Site | Register</title>
</head>