Skip to main content
Version: 5.11.6

Using 'Sign in With Apple'(Logging in With Apple)

Flow of the Process
  1. Log in with an Apple account using the 'Sign in with Apple' function

    1. Obtain an Apple identity Token

    2. Obtain a BACKND Access token by verifying the Apple identity Token

    3. Log in to the BACKND server using the BACKND Access token

    4. Once you obtain the access token, you can use it to perform a token login. For more information on the token, refer to the relevant documentation.

  • Sign in with Apple works properly only in iOS 13.0 or later.
    • The function requires macOS 10.14(Mojave) or 10.15(Catalina) and Xcode 11 for iOS 13.0.
    • Also, to use this method in an application under development, you must first enable 'Sign in with Apple' in the Apple Developer Portal.
    • For more information, refer to Support for Apple Sign in.
  • Caution when transferring a game between Apple developer accounts
    When transferring a game to another account from the account you first operated on, the Team ID will be changed, bringing upon changes in the unique values(sku of each user) for when users log in. Due to this, you cannot log in using the previous information. This is due to Apple's policy, and if you wish to provide a stable gaming service, BACKND's paid technical support is necessary. If you wish to proceed with the transfer, please make an inquiry to the community or in advance to prevent any inconvenience that may occur when operating your game.

Initial settings

Enable Sign in with Apple in the Apple Developer Portal

Access Apple Developer - Member Center, click Certificates, Identifiers & Profiles, enter the relevant app in Identifiers, and check Sign In with Apple.


public BackendReturnObject AuthorizeFederation(string federationToken, FederationType type);
public BackendReturnObject AuthorizeFederation(string federationToken, FederationType type, string ect);


federationTokenstringToken value created via each login plugin
federationTypeFederationTypeType of federation.(FederationType.Apple)
ectstring(Optional) The piece of information desired to be saved from the additional information


An attempt is made to sign up or log in using the member information token value of Apple.

For more information on how to use the API, see SignInWithApple.cs - a sample script of a sample project provided by Unity.
You can sign up/sign in at LoginCompletedCallback() of SignInWithApple.cs using the idToken value of userInfo.
The following is the token returned from Apple:


Example of a normal code

    BackendReturnObject bro = Backend.BMember.AuthorizeFederation("idToken", FederationType.Apple, "siwa");

Debug.Log("Login with Apple successful");
//Handled as success
Debug.LogError("Sign In with Apple failed");
//Handled as failure

Example of Lupidan open source

The code is GameMenuHandler.cs of [Lupidan]'s( example project.
Please note the support and inquiry service for the code of this open source is unavailable because the code is not officially provided by BACKND.

public void SetupAppleData(string appleUserId, ICredential receivedCredential)
var appleIdCredential = receivedCredential as IAppleIDCredential;
if(appleIdCredential.IdentityToken != null)
var identityToken = Encoding.UTF8.GetString(appleIdCredential.IdentityToken, 0, appleIdCredential.IdentityToken.Length);

Debug.Log("Token: " + identityToken);

var bro = Backend.BMember.AuthorizeFederation(identityToken, FederationType.Apple);
Debug.Log("Login result: " + bro);

Return cases

Success cases

When the login is successful
statusCode : 200

When signing up as a new member is successful
statusCode : 201

Error cases

When the account is blocked
statusCode : 403
errorCode : Reason for blocking entered in the console

(Using BACKND Appke Login SDK) When identifier does not match identifier entered in the console statusCode : 401
errorCode BadUnauthorizedException

After building, set in Xcode

1) Build Phases > Add Link Binary With Libraries > Add AuthenticationServices.framework > Change Status into Optional

2) Signing & Capabilities > Add Capabilitiy > Add Sign In with Apple