diff --git a/src/feature/AuthorizePasskeys/lib/useAuthenticateViaPasskeys.ts b/src/feature/AuthorizePasskeys/lib/useAuthenticateViaPasskeys.ts index 3f6b0a6..b9a8101 100644 --- a/src/feature/AuthorizePasskeys/lib/useAuthenticateViaPasskeys.ts +++ b/src/feature/AuthorizePasskeys/lib/useAuthenticateViaPasskeys.ts @@ -9,39 +9,8 @@ type Props = { }; export const useAuthenticateViaPasskeys = (props?: Props) => { - // const verifyLoginChallenge = useMutation({ - // mutationFn: authService.verifyAuthentication, - // onSuccess: (data) => { - // console.info('[VerifyLoginChallenge:onSuccess]', data); - // }, - // onError: (err) => { - // console.info(`[VerifyLoginChallenge:onError]: ${JSON.stringify(err)}`); - // }, - // }); - return useMutation({ mutationFn: authService.authenticateKeys, - onSuccess: async () => { - // console.info('[GenerateLoginChallenge:onSuccess]', resp); - // const options = resp.data.options; - // if (options.allowCredentials && options.allowCredentials.length < 1) { - // if (props?.loginIfNoCredentials) { - // props.loginIfNoCredentials(variables); - // } - // return; - // } - // try { - // console.log('Passkey options', options); - // const result = await startAuthentication({ optionsJSON: options }); - // console.log(result); - // verifyLoginChallenge.mutate({ - // email: variables, - // challengeResponse: result, - // }); - // } catch (error: unknown) { - // console.error(error); - // } - }, onError: (err) => { console.error(`[GenerateLoginChallenge:onError]: ${JSON.stringify(err)}`);