Skip to content

Commit a440243

Browse files
committed
Fix challenge ID param
1 parent 15e85cb commit a440243

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@authsignal/browser",
3-
"version": "1.12.1",
3+
"version": "1.12.2",
44
"type": "module",
55
"main": "dist/index.js",
66
"module": "dist/index.js",

src/api/types/passkey.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export type AddAuthenticatorResponse = {
4545
export type VerifyRequest = {
4646
authenticationCredential: AuthenticationResponseJSON;
4747
deviceId?: string;
48+
challengeId?: string;
4849
useCookies?: boolean;
4950
};
5051

src/passkey.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export class Passkey {
169169

170170
const optionsResponse =
171171
params?.action || !params?.useCookies
172-
? await this.api.authenticationOptions({token: params?.token})
172+
? await this.api.authenticationOptions({token: params?.token, useCookies: params?.useCookies})
173173
: await this.api.authenticationOptionsWeb({token: params?.token});
174174

175175
if ("error" in optionsResponse) {
@@ -192,6 +192,7 @@ export class Passkey {
192192
authenticationCredential: authenticationResponse,
193193
token: params?.token,
194194
deviceId: this.anonymousId,
195+
challengeId: optionsResponse.challengeId,
195196
useCookies: params?.useCookies,
196197
});
197198

0 commit comments

Comments
 (0)