Apple Sign In - No code on redirect

Hello,

We are implementing the Apple Sign In on our website, and we are stuck and can't find any docs or issues on the forum about this.

We generate the valid URL (https://appleid.apple.com/auth/authorize) to request the authorization code and the login part works flawlessly.
The problem arrives processing the POST request from Apple (redirect_uri given by us). Its comes empty.
No authorization code, no params, no nothing. Just a empty request.
We just can't figure it out what is wrong here.
Maybe a configuration problem?

Any help will be greatly appreciated.

Thanks
hi AlexShisha,

Please try to generate the url with 'responsemode' as query. We will be getting the 'state' and 'code' in the returnUrl

Eg: ReturnUrl?state=19f21a0e16&code=cf081883983be426f9daef9322d118015.0.nsuy.PID-LMR-mi6ZJ-btZNcFNw

$baseUrl = APPLEID
APPLECOM . '/auth/authorize';
$
SESSION['state'] = bin2hex(randombytes(5));
$fields = [
'response
type' => 'code',
'clientid' => 'com.service.id',
'response
mode' => 'query',
'redirecturi' => "<redirecturi>",
'state' => $_SESSION['state']
];


Clear your browser cache to get the latest. Server cache – Your site is being cached with some caching software, and this needs to be updated to include your redirect. Not matched – Your redirect is not matching the URL . If you are using a regular expression then check your expression. I use this URL for redirect purpose. I suggest it for anyone.

Apple Sign In - No code on redirect
 
 
Q