Applied auth popup doesn't returns sign-In promise response

I'm integrating the social login using apple sdk on my site

Actually our login flow require the apple id popup solution to prevent user get out site, actually Im using this configurations on init:

Init code:

window.AppleID.auth.init({ clientId : 'example.client.id', scope : 'name email', redirectURI : 'https://mtest.thecompleteuniversityguide.co.uk', state: "origin:web", usePopup : true })

APP URL :

https://mtest.thecompleteuniversityguide.co.uk/log-in

Login code:

async function appleSignIn() { try { const result = await window.AppleID.auth.signIn(); console.log("result: ", result); // Handle successful response. //applesocialsignsucess(data); } catch ( error ) { // Handle error. console.log("Error", error); } }

document.addEventListener('AppleIDSignInOnSuccess', (event) => { // Handle successful response. console.log("Successfully Login "+event.detail.data); });

document.addEventListener('AppleIDSignInOnFailure', (event) => { // Handle error. console.log("Error "+event.detail.data); alert("Error "+event); });

THE PROBLEM IS:

When the popup is opened and the apple id and password are correctly entered, the promise is not returned.

When the cancel button is pressed, the popup does not close and no error is generated.

The error is only called when the popup is closed using the navigation button.

I require assistance; what are the issues with implementation?

Post not yet marked as solved Up vote post of sathish037 Down vote post of sathish037
908 views
  • Did you fix it yet?? IF yes, could you please tell me how??

Add a Comment

Replies

@sathish037 any luck?

  • I am also facing same issue, Did you fix it??

Add a Comment