Authentication

The PlayFab Authentication is the security requirement for the PlayFab Master Collection to use most features.

The Authentication addon supports various auth methods, including company authentication using email, username and password. Mobile device UDID for both Android and iOS, social authentications like Facebook and Google Play and custom ids which can be used for custom cryptographic authentications.

Most addons in the PlayFab Master Collection require the Authentication module to be able to run its user-based features.

Actions, Conditions & Expressions

Actions

Actions.png

Company Authentication

  • Company Login - Login with Company Authentication Credentials.​​

    • Key - Depending on the method. The Key will either be the Email or Username.​

    • Password - The password for the company authentication.

    • Method - Choose the Key for the authentication. Either Email or Username.

      • When Email is chosen, one trigger condition response is fired at the condition group Company Email Login.​

      • When Username is chosen, one trigger condition response is fired at the condition group Company Username Login.

  • Company Register - Register with Company Authentication Credentials.
    One trigger condition response is fired at the condition group
    Company Register.

    • Email - ​The Email Address for the new account.

    • Username - PlayFab username for the account. (3-20 characters)

    • Password - Password for the PlayFab account. (6-100 characters)

    • Display Name - An optional parameter for setting the display name for this title (game). (3-25 characters)

Quick Authentication

  • Android Device Login - Signs the user in using the Android device identifier.
    One trigger condition response is fired at the condition group
    Android Device Login.

    • UUID - The Android Device's Unique Device ID. ​

      • Use the Mobile Info addon from the Mobile Master Collection to get the device's UUID.​

    • OS - ​The Android Device's Operating System.

      • Use the Mobile Info addon from the Mobile Master Collection to get the device's OSVersion.​​

    • Model - ​The Android Device's Model.

      • Use the Mobile Info addon from the Mobile Master Collection to get the device's Model.​​

    • Create Account - Automatically create a PlayFab account if one is not currently linked to this ID.​ [Enabled or Disabled]

  • iOS Device Login - Signs the user in using the vendor-specific iOS device identifier.
    One trigger condition response is fired at the condition group
    iOS Device Login.

    • UUID - Vendor-specific iOS identifier for the user's device. ​

      • Use the Mobile Info addon from the Mobile Master Collection to get the device's UUID.​

    • OS - ​Specific Operating System version for the user's device.

      • Use the Mobile Info addon from the Mobile Master Collection to get the device's OSVersion.​​

    • Model - ​Specific model of the user's device.

      • Use the Mobile Info addon from the Mobile Master Collection to get the device's Model.​​

    • Create Account - Automatically create a PlayFab account if one is not currently linked to this ID.​ [Enabled or Disabled]

  • Custom ID Login - Signs the user in using a custom unique identifier generated by the title (game).
    One trigger condition response is fired at the condition group
    Custom ID Login.

    • Custom ID - Custom unique identifier for the user, generated by the title. ​

    • Create Account - Automatically create a PlayFab account if one is not currently linked to this ID. [Enabled or Disabled]

Platform Authentication

  • Facebook Login - Signs the user in using a Facebook access token.
    One trigger condition response is fired at the condition group
    Facebook Login.

    • Access Token - Unique identifier from Facebook to the user. ​

      • Use the Mobile Facebook addon from the Mobile Master Collection to access the Android Facebook SDK or iOS Facebook SDK. This is where the authentication is implemented and if successful, an Access Token can then be retrieved and then, manually input it into this parameter.

      • Use the Web Facebook addon from the Mobile Master Collection to access the Web Facebook SDK. This is where the authentication is implemented and if successful, an Access Token can then be retrieved and then, manually input it into this parameter.

    • Create Account - Automatically create a PlayFab account if one is not currently linked to this ID. [Enabled or Disabled]

  • Google Login - Signs the user in using their Google account credentials.
    One trigger condition response is fired at the condition group
    Google Login.

    • ServerAuthCode - OAuth 2.0 server authentication code obtained on the client by calling the getServerAuthCode().

      • Use the Mobile GooglePlus addon from the Mobile Master Collection to access the Android GooglePlus SDK or iOS GooglePlus SDK. This is where the authentication is implemented and if successful, a ServerAuthCode can then be retrieved and then, manually input it into this parameter.

    • Create Account - Automatically create a PlayFab account if one is not currently linked to this ID. [Enabled or Disabled]

Conditions

Company Email Login

  • On Company Email Login - Triggers when the Company Email Login Process succeeded.

  • On Email Account not found - Triggers when the Company Email Account is not found.

  • On Invalid Email or Password - Triggers when the Company responded, Invalid Email or Password.

  • On Company Email Login Error - Triggers when the Company Email Login has failed with an error.

Company Username Login

  • On Company Username Login - Triggers when the Company Username Login Process succeeded.

  • On Username not found - Triggers when the Company Username Account is not found.

  • On Invalid Username or Password - Triggers when the Company responded, Invalid Username or Password.

  • On Company Username Login Error - Triggers when the Company Username Login has failed with an error.

Company Register

  • On Company Register - Triggers when the Company Registration process succeeded.

  • On Email Address Not Available - Triggers when the Company Register responded that the Email Address is not available.

  • On Invalid Email Address - Triggers when the Company Register responded that the Email Address is invalid.

  • On Invalid Password - Triggers when the Company Register responded that the Password is invalid.

  • On Invalid Username- Triggers when the Company Register responded that the Username is invalid.

  • On Name Not Available - Triggers when the Company Register responded that the Name is not available.

  • On Profane Display Name - Triggers when the Company Register responded that the Display Name is profane.

  • On Username Not Available - Triggers when the Company Register responded that the Username is not available.

  • On Company Register Error - Triggers when the Company Registration has failed with an error.

Android Device Login

  • On Android Device Login - Triggers when the Android Device Login Process succeeded.

  • On Account not found - Triggers when the Account is not found.

  • On Android Login Error - Triggers when the Android Device ID login has failed with an error.

iOS Device Login

  • On iOS Device Login - Triggers when the iOS Device Login Process succeeded.

  • On Account not found - Triggers when the Account is not found.

  • On Android Login Error - Triggers when the iOS Device ID login has failed with an error.

Custom ID Login

  • On Custom ID Login - Triggers when the Custom ID Login Process succeeded.

  • On Account not found - Triggers when the Account is not found.

  • On Custom ID Login Error - Triggers when the Custom ID login has failed with an error.

Facebook Login

  • On Facebook Login - Triggers when the Facebook Process succeeded.

  • On Facebook Account not found - Triggers when the Facebook Account is not found.

  • On Facebook Login Error - Triggers when the Facebook login has failed with an error.

Google Login

  • On Google Login - Triggers when the Google Login Process succeeded.

  • On Google Account not found - Triggers when the Google Account is not found.

  • On Google Login Error - Triggers when the Google login has failed with an error.

Tools

  • Is Authenticating - Checks if a platform is authenticating.

    • Auth Method - The authentication method that is currently authenticating.

      • Company​

      • Facebook

      • Google Play

      • Android

      • iOS

      • Custom ID

  • Is Any Authenticating - Checks if any platform is authenticating.

Expressions

Company Email Login

  • getEmailNewlyCreated - Return True if newly created or False if a simple login, from the Company Email Login.

  • getEmailPlayFabID - Return the PlayFabID from the Company Email Login.

  • getEmailSessionTicket - Return the Session Ticket from the Company Email Login.
     

Company Username Login

  • getUsernameNewlyCreated - Return True if newly created or False if a simple login, from the Company Username Login.

  • getUsernamePlayFabID - Return the PlayFabID from the Company Username Login.

  • getUsernameSessionTicket - Return the Session Ticket from the Company Username Login.

Company Register

  • getRegisterNewlyCreated - Return True if newly created or False if a simple login, from the Company Register.

  • getRegisterPlayFabID - Return the PlayFabID from the Company Register.

  • getRegisterSessionTicket - Return the Session Ticket from the Company Register.

Android Device Login

  • getAndroidNewlyCreated - Return True if newly created or False if a simple login, from the Android Device Login.

  • getAndroidPlayFabID - Return the PlayFabID from the Android Device Login.

  • getAndroidSessionTicket - Return the Session Ticket from the Android Device Login.

iOS Device Login

  • getIOSNewlyCreated - Return True if newly created or False if a simple login, from the iOS Device Login.

  • getIOSPlayFabID - Return the PlayFabID from the iOS Device Login.

  • getIOSSessionTicket - Return the Session Ticket from the iOS Device Login.

Custom ID Login

  • getCustomIDNewlyCreated - Return True if newly created or False if a simple login, from the Custom ID Login.

  • getCustomIDPlayFabID - Return the PlayFabID from the Custom ID Login.

  • getCustomIDSessionTicket - Return the Session Ticket from the Custom ID Login.

Facebook Login

  • getFacebookNewlyCreated - Return True if newly created or False if a simple login, from the Facebook Login.

  • getFacebookPlayFabID - Return the PlayFabID from the Facebook Login.

  • getFacebookSessionTicket - Return the Session Ticket from the Facebook Login.

Google Login

  • getGoogleNewlyCreated - Return True if newly created or False if a simple login, from the Google Login.

  • getGooglePlayFabID - Return the PlayFabID from the Google Login.

  • getGoogleSessionTicket - Return the Session Ticket from the Google Login.

Server Response

  • ServerResponse - Return the Server Response from every request from the PlayFab Server.​ The server response can also be shown in the Chrome Developer Tools : Console, if in debug mode.

Global

  • IsNewlyCreated - Return "True" if newly created or "False" if a regular login, from any recent login.

  • PlayFabID - Return the PlayFabID from any recent login.

  • SessionTicket - Return the Session Ticket from any recent login.

Introduction

The Authentication with PlayFab is easy while versatile, having covered most leading platforms, namely Web,  Android, iOS, Desktop, Facebook, Instant Games, Xbox, PlayStation, Nintendo and more. It brings enterprise-level account system features for your online games, into both Construct 3 and Construct 2 projects.

It supports both web and native implementations, with other additional tools in the collection to support each platform.

PlayFab has one of the most important features you'll need for an online game.

The Cloud Save, it stores the data of users in a dedicated cloud space while also syncing it through different authentication methods.

The Authentication with PlayFab has support for almost all platforms. But in this particular discussion, we will focus in mobile development, since it best utilizes this feature.

As you can observe with the images from the right, there are these concepts called Switch Account and Bind Account
These can be translated to the plugins in the 
PlayFab Master Collection, which in order are the Authentication and Sync Manager plugins.

But before that, an explanation on the process of authentication and sync is necessary to make this easier to understand.

Initially, when an application connects to PlayFab, a one-time process account registration is recommended.

There are many authentication methods to choose from, which are to wit: Company, Android, iOS, FacebookGoogle Play and Cryptography.

You can choose any initial authentication method for the user, but a registration without a player input is ideal for games.

The player can just proceed to link and secure the account after making a better bond with the game. This ensures you attract more users by not hassling them of forcing to login.

Once initially registered, the player's account will be created. Then the player can add more authentication methods through the Sync Manager.

This enables the same account to be accessed with different account methods, this is called account binding.

If the player wants to switch to a different account, the player can simply login to one of the authentication methods of that other account. This is called account switching.

Registering through generated ids are common with web applications using the Custom ID authentication method.

 

On mobile, the common way of registration for authentication is through the device id, either the Android or iOS Device Info.

You can still use social networks like Facebook and Google Plus, or your own company's allocated server account system, using the Email, Username and Password registration.

Although, it's essential that the registration process is effortless for the players.

It is without of doubt easy to use and a useful skill to learn for game development. 

These are online tools you can use for any online game application, and it only requires a bit of learning.

And, you may always contact support, if you are in need of assistance.

Sync Manager

The Sync Manager goes well hand in hand with the Authentication addon. Once a user is registered through the Authentication addon, it can add more authentication methods through syncing or binding. Therefore, allowing the account to secure more authentication methods to login with the Authentication addon.

The available sync methods are the same with the available authentication methods.

 

Once synced, the user can then login with that ​auth method through the Authentication addon.

 

Intstructions

1. The first step is to add the PlayFab API addon into the project.

2. Next is to add the Authentication addon into the project.

Authentication Methods

Company

Android

iOS

Facebook

Google Play

Cryptography

The Authentication addon manages the login/signup system for the account server system of your game. It utilizes the backend service of PlayFab to implement this. 
There are 6 methods of authentication, namely the Company, Android, iOS, FacebookGoogle Play and Cryptography.

  • Company - uses an email, username and password authentication. This is an authentication system where you can use the server allocation for your own company title.

  • Android - uses the Android device's UUID (Universally Unique Identifier) for authentication.

    • Mobile Info - this addon is required to obtain the mobile device's UUID.

  • iOS - uses the iOS device's UUID (Universally Unique Identifier) for authentication.

    • Mobile Info - this addon is required to obtain the mobile device's UUID.

  • Facebook - uses Facebook for authentication. This requires an access token to access the Facebook servers.

    • Mobile Facebook - this addon is required to use either the Android Facebook SDK or iOS Facebook SDK. This is where the authentication is implemented and then an Access Token is manually passed into the Authentication plugin.

    • Web Facebook - this addon is required to use the Web Facebook SDK. This is where the authentication is implemented and then an Access Token is manually passed into the Authentication plugin.

  • Google Play - uses Google Plus for authentication. This requires a ServerAuthCode​ to access the Google servers.

    •  Mobile GooglePlus - this addon is required to use the Android Google Plus SDK or iOS Google Plus SDK. This is where the authentication is implemented and then a ServerAuthCode is manually passed into the Authentication plugin.

  • Cryptography - also known as the Custom ID. This is a customized identification you can assign for each user as an authentication method. It's named cryptography due to its flexibility of being  assigned with any string. This gives you freedom on how you want to implement authentication for your game.

 
 
 
 

Game Project

Sample Setup Project

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Supporters

Only

Company Authentication

Sample Game Project

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Supporters

Only

Mobile Device Authentication

Sample Game Project

Dependencies​:

  • Mobile Info - requirement for mobile.

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Supporters

Only

Custom ID Authentication

Sample Game Project

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Supporters

Only

Facebook Authentication

Sample Game Project

Dependencies​:

  • Mobile Facebook - requirement for mobile.

  • Web Facebook - requirement for web.

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Mobile  Implementation

Web Implementation

Supporters

Only

Google Plus Authentication

Sample Game Project

Dependencies​:

  • Mobile GooglePlus - requirement for mobile.

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Supporters

Only

 

Get the tools

for your pro games!

Constuct Master Collection - Itch.io
Constuct Master Collection - Discord
Constuct Master Collection - Construct 3

© Construct Master Collection 2020 • All rights reserved

Contact Information:

Conditions - 1