Skip to content

Commit

Permalink
fixed demos with new challenge function
Browse files Browse the repository at this point in the history
  • Loading branch information
dagnelies committed Aug 8, 2024
1 parent 0ef2c07 commit b9c6883
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/demos/js/basic.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { client, parsers } from './webauthn.min.js'
import { client, parsers, server } from './webauthn.min.js'

Vue.prototype.$buefy.config.setOptions({
defaultProgrammaticPromise : true
Expand Down Expand Up @@ -27,7 +27,7 @@ const app = new Vue({

try {
// 1. Get a challenge from the server
const challenge = window.crypto.randomUUID(); // faking it here of course
const challenge = server.randomChallenge(); // should be remotely fetched of course

// 2. Invoking WebAuthn in the browser
const registration = await client.register({
Expand Down Expand Up @@ -66,7 +66,7 @@ const app = new Vue({

try {
// 1. Get a challenge from the server
const challenge = window.crypto.randomUUID(); // faking it here of course
const challenge = server.randomChallenge(); // should be remotely fetched of course

// 2. Invoking WebAuthn in the browser
const authentication = await client.authenticate({
Expand Down
6 changes: 3 additions & 3 deletions docs/demos/js/conditional-ui.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { client, parsers } from './webauthn.min.js'
import { client, parsers, server } from './webauthn.min.js'

Vue.prototype.$buefy.config.setOptions({
defaultProgrammaticPromise : true
Expand Down Expand Up @@ -29,7 +29,7 @@ const app = new Vue({

try {
// 1. Get a challenge from the server
const challenge = window.crypto.randomUUID(); // faking it here of course
const challenge = server.randomChallenge(); // should be remotely fetched of course

// 2. Invoking WebAuthn in the browser
const registration = await client.register({
Expand Down Expand Up @@ -72,7 +72,7 @@ const app = new Vue({

try {
// 1. Get a challenge from the server
const challenge = window.crypto.randomUUID(); // faking it here of course
const challenge = server.randomChallenge(); // should be remotely fetched of course

// 2. Invoking WebAuthn in the browser
const authentication = await client.authenticate({
Expand Down

0 comments on commit b9c6883

Please sign in to comment.