Skip to content

Commit d0def81

Browse files
authored
fix: provide an error message when user cancel passkey (#383)
1 parent 888a540 commit d0def81

File tree

1 file changed

+8
-1
lines changed
  • packages/better-auth/src/plugins/passkey

1 file changed

+8
-1
lines changed

packages/better-auth/src/plugins/passkey/client.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,14 @@ export const getPasskeyActions = (
6363
return verified;
6464
}
6565
} catch (e) {
66-
console.log(e);
66+
return {
67+
data: null,
68+
error: {
69+
message: "auth cancelled",
70+
status: 400,
71+
statusText: "BAD_REQUEST",
72+
},
73+
};
6774
}
6875
};
6976

0 commit comments

Comments
 (0)