Skip to content

Commit

Permalink
Remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
moiskillnadne committed Oct 26, 2024
1 parent 7f84005 commit e49047c
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions src/feature/AuthorizePasskeys/lib/useAuthenticateViaPasskeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`);

Expand Down

0 comments on commit e49047c

Please sign in to comment.