Apple
Last updated
Last updated
To start using Sign in with Apple we first need to configure our integration in the
Team ID
You can find your Apple Team ID by logging in to the Apple developer portal and going to the Membership page. On that page you should be able to see your Team ID.
Client ID
Client ID will in most cases be the bundle identifier for your App when you created it in Xcode or in the Apple developer portal.
Key ID & Certificate
After logging in to your Apple developer portal, navigate to the "Certificates, Identifiers & Profiles" page. From here you can create a new key.
When creating a key, make sure to enable "Sign in with Apple" and pressing the configure button. The "Primary App ID" should be the same as your game (bundle identifier)
When finished creating your key, make sure you download the certificate, which we will upload in the LootLocker Console.
The Key ID can be seen when clicking the key after creation in the Apple developer portal.
With Apple authentication, you can refresh the session instead of having the player do a full sign-in every time. The request will return a 401 (Unauthorized) if the refresh token has expired, in which case you will need to start a new session.
You need to acquire an to be able to start an apple session, but once you have that, simply follow along to the code snippet below. In the response from LootLocker you will find a refresh token. We will store this and use it to refresh the session during the lifetime of the refresh token so that you do not need to do the full sign-in flow each time.
To copy and paste the above example into your editor, .
You need to exchange the TriggerAppleStartSession
event for whatever event you want to use to trigger the login flow. Remove the node REPLACE: Apple Auth Code
and replace it with your preferred method of getting the.
To copy and paste the above example into your editor, .
You need to exchange the TriggerAppleRefreshSession
event for whatever event you want to use to trigger the login flow. The node Refresh Token
is the one you saved , but it is optional as we save it behind the scenes as well.
Congratulations - you have now started using LootLocker in your game with Apple Game Center! Next up we suggest you look at our and decide which ones you want to use in your game.