An example of Stranger Labs' WebAuthn RP usage
$ npm i
- Install dependencies (as above).
- Edit the WebAuthn configuration in
server.js
:
const webauthn = new Webauthn({
origin: 'http://localhost:3000',
rpName: 'Stranger Labs, Inc.',
// store: new LevelAdapter(),
// OR
// store: {
// put: async (id, value) => {/* return <void> */},
// get: async (id) => {/* return User */},
// search: async (search) => {/* return { [username]: User } */},
// delete: async (id) => {/* return boolean */},
// },
// ...
})
- Build the react application and run the server:
$ npm start
For an unoptimized development version, first run the server:
$ npm run dev-server
Then in another terminal, run the react application in development mode:
$ npm run dev-client
Small note: If editing the README, please conform to the standard-readme specification.
MIT © 2019 Stranger Labs, Inc.