onSuccess is not calling after successfull signin response
Dhruvin-delemont opened this issue · comments
<div className="flex justify-center">
<AppleSignin
className="apple-auth-btn"
authOptions={{
clientId: 'com.example.www',
scope: 'email name',
redirectURI:
'https://www.example.com/auth/apple-authentication/callback',
state: 'state',
nonce: 'nonce',
usePopup: true,
}}
buttonExtraChildren={'Sign in with Apple'}
onSuccess={(response) => {
console.log(response);
alert('Okay');
}}
onError={handleAppleLoginFailure}
/>
</div>
I am Facing Same error
onSuccess only gets called in case of using popups usePopup true
I can see you're using redirects, so you need to handled your on success logic via parsing the route URL instead OR use popup ONLY
if I use popup ONLY then the popup is not opening
<div className="flex justify-center">
<AppleSignin
className="apple-auth-btn"
authOptions={{
clientId: 'com.example.www',
scope: 'email name',
usePopup: true,
}}
buttonExtraChildren={'Sign in with Apple'}
onSuccess={(response) => {
console.log(response);
}}
onError={handleAppleLoginFailure}
/>
</div>