Sign up popup not closing.

The popup opens. And after finishing the 2FA, it never closes.

This is happening without the popup, it does not redirect.


The only error that shows in console is:

Failed to load resource: the server responded with a status of 409 ()

POST https://appleid.apple.com/appleauth/auth/signin 409


Also, in the network, the call to https://appleid.apple.com/appleauth/auth/oauth/authorize is successful with response:

{

"authorization" : {

"id_token" : "...",

"grant_code" : "...",

"scope" : [ "name", "email" ]

},

"authorizedData" : {

"userId" : "..."

},

"consentRequired" : false

}

Accepted Reply

Found the problem.


The redirectURI should start with "https://".

Also make sure the redirectURI matches correctly with the page that opened the popup.


Now it works properly.

Replies

Found the problem.


The redirectURI should start with "https://".

Also make sure the redirectURI matches correctly with the page that opened the popup.


Now it works properly.

This was exactly my issue, too. I had to configure my local dev environment for https and then set the redirect uri to be https, and it worked. Thank you so much for the help!

What should be a redirectURI? can you show your example? thanks

You can configure redirect URI using the steps from this article:
https://medium.com/identity-beyond-borders/how-to-configure-sign-in-with-apple-77c61e336003

Why is the redirect should match the page that opens the popup?
What if the page that open the popup is dynamic (for example you have a login popup in your website, and users can login with this popup from any page in the website, it can be https://example.com/category/123 or https://example.com/post/some-title)
So there is the login popup in the website, that you want it to open the apple signin popup.
How can we use apple sign in popup in this case?
The redirect URLs are constant and predefined in the developers dashboard