Chapter 24: Empty cookies dictionary when appleAuthCallbackHandler(_:)

appleAuthCallbackHandler: siwaData has user == nil with other valid properties
appleAuthRedirectHandler: siwaToken has an email address for forwarding, not an original email. Since the app uses ‘data’ for an user info, I get “” for all fields. I have never seen there a valid user info, even at the first time. Although I can get forwarding address, I can’t get first and second names anywhere.

PR is Fix issues with date parsing in HTTP headers by 0xTim · Pull Request #2630 · vapor/vapor · GitHub

1 Like

Are you requesting the names?

Yes. let scopes = “name email”

I have understood your words at last.

So I created a new services id and set other primary app id. Fail again. What to try else? Please advise.

I’m a bit out of ideas I’m afraid. My advice would be to debug the responses from Apple and print out the raw bodies to see what data they’re sending, rather than the decoded data

If you update to Vapor 4.45.6 that should make Sign in With Apple work again

1 Like

I have updated Vapor to v4.45.6, nothing has been changed. The cookie is not visible. Does the whole sign in process work for you? Do you get name and email at the final?

req.body.string shows that decoding works correctly. P.S. It’s interesting, I don’t get a two-factoring request.

I’m sorry, the cookie is working. There was a wrong parameter in it after experiments. Thank you very much for the prompt work!

Thank you! I can confirm it’s working now :smiley:

1 Like

Well, all is working. It’s needed to stop using your Apple ID with an app every time for testing:
https://support.apple.com/en-us/HT210426

1 Like