From 3cf5094c169c9e80666e74561831fbfd20d8f24e Mon Sep 17 00:00:00 2001 From: tipusinghaw Date: Tue, 26 Mar 2024 19:18:44 +0530 Subject: [PATCH 1/2] fix passkey login issue Signed-off-by: tipusinghaw --- src/components/Authentication/SignInUserPasskey.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Authentication/SignInUserPasskey.tsx b/src/components/Authentication/SignInUserPasskey.tsx index bc1078900..54a389aca 100644 --- a/src/components/Authentication/SignInUserPasskey.tsx +++ b/src/components/Authentication/SignInUserPasskey.tsx @@ -110,6 +110,7 @@ const SignInUserPasskey = (signInUserProps: signInUserProps) => { const opts = generateAuthenticationResponse?.data?.data; const attResp = await startAuthentication(opts); + opts.allowCredentials = [] // to fix the paaskey issue(Patch on PROD) const verifyAuthenticationObj = { ...attResp, challangeId, From 4433e65f84f256398347c966806100f540f047b4 Mon Sep 17 00:00:00 2001 From: tipusinghaw Date: Tue, 26 Mar 2024 19:39:58 +0530 Subject: [PATCH 2/2] fix: handled the undefine and null for allowCredentials Signed-off-by: tipusinghaw --- src/components/Authentication/SignInUserPasskey.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Authentication/SignInUserPasskey.tsx b/src/components/Authentication/SignInUserPasskey.tsx index 54a389aca..e6c7f5c1a 100644 --- a/src/components/Authentication/SignInUserPasskey.tsx +++ b/src/components/Authentication/SignInUserPasskey.tsx @@ -109,8 +109,10 @@ const SignInUserPasskey = (signInUserProps: signInUserProps) => { setFidoUserError(generateAuthenticationResponse?.data?.error); const opts = generateAuthenticationResponse?.data?.data; + if (opts) { + opts.allowCredentials = [] // to fix the paaskey issue(Patch on PROD) + } const attResp = await startAuthentication(opts); - opts.allowCredentials = [] // to fix the paaskey issue(Patch on PROD) const verifyAuthenticationObj = { ...attResp, challangeId,