Authentication Cross-Platform Features

One of the major trends in game development is the rise in multiplatform games that span across mobile, desktop, and consoles. These multiplatform games lead to player expectations to support cross-platform capabilities. Players want the flexibility to choose their preferred gaming platform and expect smooth transitions between devices.

UGS now offers a robust cross-platform suite of account and authentication solutions that support cross-play and progression across all major devices and platforms: Android, iOS, Windows, MacOS, and consoles. In addition, developers can now integrate UGS with any custom authentication system through OpenID Connect and Custom Token Exchange, making it easy for games with custom identity solutions to unlock the full power of UGS.

Learn more about our cross-platform solutions and how they can support your use cases:

1. Code link

Code link provides simple and fast cross-platform identity support across mobile, desktop, and console devices by generating simple codes on one logged in device that can be used to sign in on another device.

You can provide your players with the flexibility to move across platforms without requiring them to enter their login credentials multiple times and completely avoid third party sign-ins. Code linking supports both anonymous and platform-specific sign-in methods.

For example, a player can start a game anonymously on their Android device. After reaching level 2, they decide to continue progress on their console device. The player can open the game on their console to generate a code, which they enter into their Android device. Once confirmed, they can continue playing on their console.

Code linking is available for SDK versions 3.0.0 and newer.

To configure code linking within your Unity Dashboard account:

  1. Within the Authentication section of Dashboard, select Code Linking as the Identity Provider
  2. Add the provider
  3. Code Linking will appear in your dashboard, where you can enable, disable, or delete as needed

Learn more code link

2. Unity Player Accounts

Unity Player Accounts is our premier out-of-the-box sign-in and identity solution built for gaming. It’s built for developers that require a cross-platform, cross-device and/or cross-game identity provider for their players, but don’t want to build a custom identity solution or rely on a 3rd party account provider (e.g. social networks). It is seamlessly integrated with the UGS (Unity Gaming Services) and Unity ecosystem.

Previously in Beta, Unity Player Accounts is now available as a general availability (GA) solution that is supported across a range of platforms and devices, including iOS, Android, Windows, and MacOS.

Your players can create a single account that can be used for any game that supports Unity Player Accounts as a sign-in provider. You can also provide a persistent player profile across all your games that leverage Unity Player Accounts through our organization-level player identifiers.

Once you install the SDK, you can use Dashboard to configure your Unity Player Account settings:

  • Within the Authentication section of Dashboard, select Unity Player Accounts as the Identity Provider.

  • Set up Unity Player Accounts by adding your game’s name and supported platforms. The TOS and Privacy Policy can be added once you are ready to go live with your game.

  • Unity Player Accounts will appear in your dashboard, where you can enable, disable, or delete as needed.

Learn more about Unity Player Accounts

3. Username and Password

The username and password feature lets your players log into your game with game-specific sign-in credentials. This enables you to build an authenticated user base within your game without needing to rely on third party sign-in solutions. And what’s more, username and password authentication can be customized to seamlessly integrate with your game’s aesthetics.

Username and password also works cross-platform, providing players with the ability to continue their game progress across devices and platforms.

Learn more about username and password

4. Bring Your Own Identity (BYOID)

If you already have your own custom identity solution and want to continue to use it with UGS, you can do so with our Bring Your Own Identity solutions: OpenID Connect (OIDC) or Custom ID.

The OpenID Connect solution enables you to use your existing OIDC-compliant identity solution in your game, such as PlayFab, Firebase, Epic Online Services, among others.

If your custom identity solution is not OIDC-compliant, you can use the Custom ID feature to integrate with UGS. This allows you to exchange Unity service account tokens and your custom user id for Unity Authentication Player ID and tokens.

Both OpenID Connect and Custom ID solutions are supported across all major platforms. As long as a platform is supported by your custom identity solution, you can use the Bring Your Own Identity solution to offer game progress on those devices.

Learn more about OpenID Connect and Custom ID

We want your feedback! Please take our short cross-platform survey and let us know what’s useful and what we can improve.

6 Likes

When we login anonymously on an Android device and when the game is reinstalled then it logs in as a new user. In Playfab we can use device ID to login as guest user. can we achieve the same using UGS?

Hello @sathya ,
Currently, Authentication doesn’t have built-in LoginWithAndroidDeviceID functionality. An alternative I can think of is retrieving the player’s device ID and using Custom ID. Similar with client side login with device id, the account security could be a potential issue.

Hey, Im working with Mr. Sathya on the same project.
In order to feed the details of ProcessAuthenticationTokens(accessToken, sessionToken)
I first get the access token using https://services.api.unity.com/auth/v1/token-exchange REST api
then
I get both the fields required using https://player-auth.services.api.unity.com/v1/projects/ REST api

Is that the right approach?

@chengg_unity

Hello, my phone number changed and I lost my recovery codes. How can I change my Two Factor Authentication phone number? Can you please help? I cannot receive payment due to this problem.

Even though I opened a ticket many times, you did not solve the problem. Shame on you…
@chengg_unity

If the user authenticates with deviceID, I want to be able to upgrade them to a proper user with an email/phone linked.

How can I let my users sign in with passwordless authentication, using their email or phone?
i.e they are sent a code to their phone or email, then enter this same code in the game.

Hello, could anyone gime some light with this doubt?

Can i use Unity Player Accounts in my Unity Projetct and for Client Authentication using Rest Curl a authentication using Google SignIn?

I see that using Unity Player Account Provider the user can use their google or appleStore accounts to signIn.
So I have a web portal that should be able to connect to the client’s UGS to show some player progress data. If my Portal uses Google SignIn, can I authenticate to the UGS using the Google connection token?

I’m not sure if this will work because in Unity I wouldn’t use Google Provider directly but rather through Unity Player Accounts

@doublehitgames_1 Unfortunately you cannot login to Unity Player Account using google or apple credentials that you have fetched yourself, it needs to go through the login page.

The only option is to use the Google provider, which you could link to an account linked to a Unity Player Account.