diff options
author | Matthew Miller <matthew@millerti.me> | 2020-07-05 00:09:06 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2020-07-05 00:09:06 -0700 |
commit | 3cd54eb9e071e53a49f62a2cfd146ae15a75c2cb (patch) | |
tree | 6acaa8c828dc73666d72a0b6ad172f66819fa534 /example/index.js | |
parent | 1702b8cce97efdfc5b9510b2a75e38aa5b8f655f (diff) |
Add MetadataService to example
Diffstat (limited to 'example/index.js')
-rw-r--r-- | example/index.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/example/index.js b/example/index.js index a8b8afa..0254e71 100644 --- a/example/index.js +++ b/example/index.js @@ -18,8 +18,26 @@ const { // Login ("Assertion") generateAssertionOptions, verifyAssertionResponse, + // Support for FIDO MDS + MetadataService, } = require('@simplewebauthn/server'); +/** + * Initialize MetadataService to enable support for the FIDO Metadata Service. Metadata enables + * a greater degree of certainty that the devices interacting with this server are what they claim + * to be according to their manufacturer. + * + * Use of MetadataService is _not_ required to use @simplewebauthn/server. If you do choose to use + * it, you'll need to set the following environment variables (.env files are supported): + * + * ENABLE_MDS=true + * MDS_API_TOKEN=YourFIDOAccessTokenGoesHere + * + * See https://mds2.fidoalliance.org/tokens/ to register for a free access token. When they ask for + * an Organization Name, "Self" works just fine. + */ +MetadataService.initialize(); + const app = express(); const host = '0.0.0.0'; const port = 443; |