question

brendan avatar image
brendan asked

LoginWithApple returning NotAuthorized

Titles are seeing a behavior change with LoginWithApple - pre-existing players are now getting "NotAuthorized" in response to the LoginWithApple with no change to the code.

appleAuthentication
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

What we're seeing is that clients hitting this error are sending invalid Identity Tokens. The issue appears to have been caused by the signing certificate at Apple having been rotated on 2022.02.28, around 14:00 UTC. The only way to fix this is to clear the token stored client-side on the device.

4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Brondon avatar image Brondon commented ·

Ah thonk you so much, ovrything mokes sonse now

0 Likes 0 ·
yuyuuyuuu avatar image yuyuuyuuu commented ·

Hi Brendan:

I see this problem now, what reason could it be?

How should I 'clear the token stored client-side'?

I tried in ios device->settings->my profile(first item in settings pannel)->Apps Using APple ID, remove my game inside, still not working, server gives me "NotAuthorized"

0 Likes 0 ·
yuyuuyuuu avatar image yuyuuyuuu yuyuuyuuu commented ·

This happens when I try to link Apple account to a existing Playfab master account

0 Likes 0 ·
yuyuuyuuu avatar image yuyuuyuuu yuyuuyuuu commented ·

Oh, I got it works. It's because I'm using a Unity 'sign in with apple' plugin that polluted the JWT(Json Web Token) apple sends back after logged in.

Unity removed its official apple signin example so I spend a lot of time trying to figure this out.

Finally, I got that removed example and get the code up and running. It has nothing to do with Playfab.

DON'T use this plugin, it's stupid and full of useless code and flooded with useless design patterns. Use the Unity official example. If you can't find it, I put it here on Github

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.