summaryrefslogtreecommitdiffhomepage
path: root/example/index.js
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2020-07-21 08:57:29 -0700
committerMatthew Miller <matthew@millerti.me>2020-07-21 08:57:29 -0700
commit98c6ecd596aae0094cd53308bc6a8527d8feb0a5 (patch)
treebafa26c270a9e8c9e680539d0ec58458f7e681f6 /example/index.js
parentdddf38f1cfaaba2c5a13ce152b5982d3a24edf26 (diff)
Make it easier to use different RP ID’s in example
Diffstat (limited to 'example/index.js')
-rw-r--r--example/index.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/example/index.js b/example/index.js
index 91b491c..4b32136 100644
--- a/example/index.js
+++ b/example/index.js
@@ -84,7 +84,7 @@ const loggedInUserId = 'internalUserId';
const inMemoryUserDeviceDB = {
[loggedInUserId]: {
id: loggedInUserId,
- username: 'user@localhost',
+ username: `user@${rpID}`,
devices: [
/**
* {
@@ -274,8 +274,8 @@ https
/**
* WebAuthn can only be run from https:// URLs. See the README on how to generate this SSL cert and key pair using mkcert
*/
- key: fs.readFileSync('./localhost.key'),
- cert: fs.readFileSync('./localhost.crt'),
+ key: fs.readFileSync(`./${rpID}.key`),
+ cert: fs.readFileSync(`./${rpID}.crt`),
},
app,
)