Sign in with apple issue (Javascript)

I'm having one issue the login pop up gets closed after the successful login but in response I get

{"isTrusted": false} Wondering what I'm missing

I have already add the sub domain and domain details in the redirect URL and my redirect URL is same as the page from which the pop up was opened.

Really sorry to say this but apple is having very poor documentation to debug the issues faced while working on sign with apple on web

Here is my code for more details

Code Block
scriptjs.get('https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js', () => {
const params = {
clientId: '*',
redirectURI: '*',
scope: 'name email',
usePopup: true,
};
window.AppleID.auth.init(params);
});


I initiate this process on button click
Code Block
handleClick={() => window.AppleID.auth.signIn()}


Code Block
//Listen for authorization success
document.addEventListener('AppleIDSignInOnSuccess', (data) => {
//handle successful response
alert(JSON.stringify(data));
// here Im getting {"isTrusted": false}
alert("Success");
});
//Listen for authorization failures
document.addEventListener('AppleIDSignInOnFailure', (error) => {
//handle error.
alert(JSON.stringify(error));
});

Hi, I have the same issue. I found some answers, that you shouldn't alert you response but you should console.log(data). But this answer doesn't help for me too
Type of data is CustomEvent, use data.detail
Sign in with apple issue (Javascript)
 
 
Q