1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-04 20:19:47 +00:00

refactor: update options API for simplewebauthn (#543)

This commit is contained in:
Jake Howard
2025-05-18 12:22:04 +01:00
committed by GitHub
parent 21bf49c061
commit a0e22036c8
4 changed files with 4 additions and 4 deletions

View File

@@ -40,7 +40,7 @@
// Get access token if not signed in
if (!$userStore?.id) {
const loginOptions = await webauthnService.getLoginOptions();
const authResponse = await startAuthentication(loginOptions);
const authResponse = await startAuthentication({optionsJSON: loginOptions});
const user = await webauthnService.finishLogin(authResponse);
userStore.setUser(user);
}

View File

@@ -41,7 +41,7 @@
// Get access token if not signed in
if (!$userStore) {
const loginOptions = await webauthnService.getLoginOptions();
const authResponse = await startAuthentication(loginOptions);
const authResponse = await startAuthentication({optionsJSON: loginOptions});
const user = await webauthnService.finishLogin(authResponse);
userStore.setUser(user);
}

View File

@@ -20,7 +20,7 @@
isLoading = true;
try {
const loginOptions = await webauthnService.getLoginOptions();
const authResponse = await startAuthentication(loginOptions);
const authResponse = await startAuthentication({optionsJSON: loginOptions});
const user = await webauthnService.finishLogin(authResponse);
userStore.setUser(user);

View File

@@ -49,7 +49,7 @@
async function createPasskey() {
try {
const opts = await webauthnService.getRegistrationOptions();
const attResp = await startRegistration(opts);
const attResp = await startRegistration({optionsJSON: opts});
const passkey = await webauthnService.finishRegistration(attResp);
passkeys = await webauthnService.listCredentials();