Skip to main content
Version: SDK-5.11.6

BACKND Google Login SDK

BACKND Google Login SDK is an SDK created and provided by BACKND to allow easier use of the Google Login function used in the federation login for Android and iOS.

You can configure the console just by registering an upload key and sha-1 certificate key to Google Cloud Platform and easily log in by registering a simple handler in the SDK to call a login method.

This SDK can be used regardless of the BACKND SDK's version.

Note for GPGS

This login approach is a Google login approach commonly used by apps and is different from the GPGS-linked login that Google supports in Unity.
If you are using GPGS's leaderboard or achievement functions, do not use this plugin. Instead, implement the login function using the GPGS plugin.

Note on migration from GPGS

BACKND Google Login SDK and GPGS plugin cannot be used together in a project.
When migrating from GPGS to BACKND Google Login SDK, you must delete all the imported GPGS plugins and import the BACKND Google Login SDK.

Migrating from version 1.0.0 -> 2.0.0

When upgrading from version 1.0.0 to 2.0.0, delete the existing GoogleLogin folder in Assets > The Backend > Toolkit, and import version 2.0.0.

Additionally, webClientId, ios URL Schema, and ios Client ID of the GCP entered in Unity Inspector will be reset.
Make sure to re-enter the information.

Apply Google Login SDK

For Android: BackendGoogleLogin-Android-2.0.1.unitypackage [2024-02-29]

Note on incompatibility with iOS Firebase SDK

For iOS, dependency libraries used in the latest Firebase SDK and Google Login SDK are causing a build error due to a clash.
Given this information, you cannot use Google Login SDK if you are using the Firebase functions in iOS.

For iOS: BackendGoogleLogin-iOS-2.0.0.unitypackage [2024-02-22]

Currently, Google Login SDK only supports Android and iOS and does not work in the Unity editor.

Install External Dependency Manager for Unity

From Google Login SDK version 2.0.0, External Dependency Manager for Unity (EDM4U) creates plugins for Android and cocoapod file for iOS.

EDM4U is usually installed along with third party services such as Firebase and AdMob.

In Unity, check to see if the ExternalDependencyManager folder exists in Assets.

If the folder does not exist, you can download it from unity-jar-resolver github.
(external-dependency-manager-latest.unitypackage)

Once the Google Login SDK is installed, click Assets on the upper side of Unity and click External Dependency Manager > Android Resolver > Force Resolve to download dependent plugins.

When EDM4U is successfully executed, a modal appears to show that it was successful.

Afterward, you can go to Assets > Plugins > Android folder and see that the plugin for Google login has been created.

EDM4U Google.IOSResolver.dll Error

When installing EDM4U, you may experience the following error:
The error does not affect the usability of the application, but if you wish to resolve the error, add the iOS platform for the current Unity version.

When EDM4U Cannot Be Used

If EDM4U cannot be used or if errors persist, you must manually install Android plugins.

However, to prevent the risk of build failure due to having plugins with the same name but different versions, delete the plugins that share the name but not the version.

Additional Android plugin (if EDM4U cannot be used): BackendGoogleLogin-extra-plugins.unitypackage [2024-02-22]

Note for ProGuard users

If you are using ProGuard, the following exception handling is needed.

-keep class io.thebackend.googlelogin.** {*;}

Initial Google Console Settings

To use Sign in with Google, you must first create client IDs in Google Cloud Platform (GCP).
If the app supports both the Android and iOS platforms, create Android and iOS client ID in each GCP project, respectively.

The login process is the same as logging in with GPGS except the use of GPGS plugin and configuring GPGS in Google Console.

Android: Additional Android Console Settings
iOS: Additional iOS Console Settings