Post not yet marked as solved
Post marked as unsolved with 1 replies, 858 views
I'm using apple login in my web app and passing the redirect URI to apple URL. It's working fine on all browsers except Safari. On Safari instead of opening the URL in a new tab it's showing the finger touch enabled login popup. Which is causing the issue and my redirect URI is not getting passed and I'm not able to receive the code and other details from apple.
Can anyone please help me resolve this issue.
Angular Code:
const openNewWindow = window.open(
'https://appleid.apple.com/auth/authorize?response_type=code&response_mode=form_post&scope=name%20email&state=W4cL2JgRJq&client_id=CLIENT_ID&redirect_uri='+ this.AppleURL',"_blank"
);
try {
openNewWindow.opener = window;
window.addEventListener('message', event => {
this.signInWithApple(JSON.parse(event.data));
});window.addEventListener('message', event => {
this.signInWithApple(JSON.parse(event.data));
});
} catch (error) {
console.log("error",error);
}
Redirect URI js code: