Skip to main content

Authentication

Authentication

Yarsa Play’s authentication module provides a swift and easy mechanism to authenticate and login players towards your games. This service includes players to:

  • Easily login to the games for a seamless start, without the hassle of remembering multiple passwords or dealing with complex authentication processes.

  • Link and unlink social media accounts with the game. This allows players to save and sync their progress across different devices, so they can continue from where they left off, no matter the platform. They can also unlink their social account from the game at any time.

  • Choose from multiple login options as provided by the developers which provides flexibility by letting players select their preferred method of authentication, whether through social media accounts or single sign-on (SSO) with guest login.

Authentication Providers

AM1

There are multiple options to provide user authentication in Yarsa Play. You can choose from:

  1. Device Login: Allows users to authenticate directly on their device, providing a secure and streamlined login experience without needing external accounts. This method is ideal for users who prefer to use their device's built-in authentication features.

  2. Facebook Login: Enables users to log in using their Facebook credentials, offering a familiar way to access their game account. This option also allows for easy social sharing and integration with friends on the platform.

  3. Google Play Login: Allows users to authenticate with their Google account, integrating seamlessly with their Google Play profile. This option benefits users with Android devices, offering a quick and secure login while syncing their progress with their Google account.

  4. Apple Login: Provides users with the ability to log in using their Apple ID, ensuring a secure and privacy-focused authentication process. This method is particularly useful for users on iOS devices, leveraging Apple's ecosystem for an efficient login experience.

Enable login from Device with it’s unique device identifier, Facebook with Client ID and Client Secret Key, Google Play authentication or one-tap Apple login. With game-specific authentication, every player's login experience is streamlined and secure, ensuring that they can quickly access their accounts and enjoy a personalized gaming experience without unnecessary hassle.

Device

The Device authentication method in Yarsa Play’s Auth module provides a straightforward way of logging in and authenticating the user with their devices. Follow through this article to understand how to set up and utilize device authentication, including detailed steps for configuration.

When a user authenticates with their device, they can access their previously recorded progress, even if the app has been deleted. However, this feature is limited to the original device used for logging in; progress will not be available on other devices.

Device-based UUID generation

There are multiple ways to authenticate players with their devices. Based on their device type, follow the listed steps to generate their UUID:

Android Devices

Go to Settings.Secure.ANDROID_ID by Android Developers Blog, and follow the mentioned steps in the article to generate device UUID.

iOS Devices

For iOS devices, follow the steps on identifierForVendor by Apple Developers Documentation.

The device login option is the default provider so you can directly head to Auth API and start implementing the device login functionality to your games.

Please check the Device Login section in our Social Authentication article for a detailed step-by-step guide on implementation.

Facebook

Yarsa Play’s authentication service offers Facebook login as a social login option, allowing players to sign in to your games with their Facebook account and eliminating the need to create a separate account. With the use of this social login option, players can save their progress and resume their game from where they left off.

Configuring App ID and App Secret Key

To implement this feature, you'll need to configure your app's ID and Secret Key. Follow these steps to complete the setup:

  • Complete the app creation process using the steps outlined by Meta App Development.

  • Then, implement Facebook login for games and enable permissions for the following app scopes:

    • public_profile

    • email

    • user_friends

    • user_photos

  • Head to App Settings > Basic. Here, you can find the App ID and App Secret needed for the Facebook Authentication fields in Yarsa Play.

  • Copy the details under the App ID and App Secret fields, paste them in their respective fields under the Facebook provider, and submit.

Implementation

Follow through the Facebook section of the social login article to implement Facebook authentication to your games easily.

Google

Google is another social login option available through Yarsa Play’s authentication module. Since all Android devices require a Google Play account, this option offers a convenient way for players to link their Google accounts with their existing game accounts. By logging in with their Google accounts, players can save their game progress and sync it across devices, allowing them to pick up right where they left off.

The Google Play authentication procedure requires Client ID and Client Secret Key which can be retrieved following the given steps:

  • Create your game project and implement Google Play sign-in on your app by following the steps listed by Google Play Games Services.

  • Head to Google Cloud > APIs & Services > Credentials and select your app from the OAuth 2.0 Client IDs

  • Copy the details from the Client ID and Client Secret fields and paste them into the corresponding fields in the Google Authentication section in your Yarsa Play dashboard. You can now use the API endpoints for linking, unlinking and logging in with your Google Play account. Our article on implementing social login with Yarsa Play has covered all the available social providers and their integration. Please refer to the document for detailed instructions on adding Google login to your games.

Apple

You can authenticate your players with their Apple accounts, directly through the dashboard. Follow the listed steps for a seamless integration:

Check Authentication API Documentation to authenticate the players using the available endpoints provided by Yarsa Play.

Next Up: Assets