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
}
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.