https://supertokens.com/ logo
Title
h

hwihwi

12/20/2022, 12:52 PM
Hi, I am using React ThirdPartyPasswordless In here (https://supertokens.com/docs/thirdpartypasswordless/common-customizations/signup-form/custom-providers) It said "you do not need to add a click handler to this as we add it for you automatically." So if I have my own button component and want to handle the onClick event by myself, I will do like this: const authUrl = await getThirdPartyAuthorisationURLWithQueryParamsAndSetState({ providerId: "google", authorisationURL: "http://localhost:3000/auth/callback/google", }); window.location.assign(authUrl); Is it correct?
n

nkshah2

12/20/2022, 12:54 PM
Hi
@porcellus Might be able to help here
p

porcellus

12/20/2022, 12:55 PM
Hi, I'll check it out in a bit.
h

hwihwi

12/20/2022, 12:56 PM
oke, thanks all
p

porcellus

12/20/2022, 1:49 PM
yep, this is correct, but you'll also have to prevent the original click handler from being called
h

hwihwi

12/20/2022, 1:51 PM
Thanks @porcellus for your answer, btw, how to prevent the original click handler from being called
p

porcellus

12/20/2022, 1:51 PM
stopPropagation should work.