Authentication

The PlayFab Authentication plugin is the account security management for the PlayFab Master Collection.


The Authentication plugin supports various authentication methods, including company email address, username and password, Android login, iOS login, social connects including Facebook and Google Play, and custom identifications including custom cryptographic code.


Most plugins in the PlayFab Master Collection require the Authentication plugin to be able to run its account system features.

PlayFab API v2.png

Introduction

Step 1.png

The Construct Master Collection supports the full and easy integration of the PlayFab service for both Construct 3 and Construct 2.


Please click here to learn more about PlayFab.

Authentication Methods

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, Facebook, Google 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 SignIn for authentication. This requires a ServerAuthCode​ to access the Google servers.

  • Google SignIn - this addon is required to use the Android Google SDK or iOS Google 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.

 
 

How to use?

It is easy to use the PlayFab API plugin, you will only need to follow the steps below.


1. Add the PlayFab API addon into your project.



2. Log in to your PlayFab account, or sign up if you do not have one yet.


3. Then, create a project and copy its title id.




4. From your Construct 3 project, click the PlayFab API object.


5. Then, go to the Properties Bar while the object is selected. This will show the Title Id property where you will input the value from the one in your PlayFab Console.


6. Finally, set the other plugin properties.

  • Debug Mode - allows the PlayFab Master Collection to make logs of the response JSON data from the PlayFab servers. This is very important when it comes to debugging received server data. The logs are accessible through the Developer Console, which is launched by pressing (F12) during preview.

  • Client Profile Data - are additional data you want included in the response callback from the PlayFab servers. This is only ran when the server allows that type of response for the command.

  • Client Sensitive Data - are additional sensitive data you want included in the response callback from the PlayFab servers. This is only ran when the server allows that type of response for the command. Compared to the Client Profile Data, these server responses are sensitive, therefore should be taken precaution before allowing to be received by the client.

7. Finally, you can now use the PlayFab API object, and include more PlayFab addons for more features.


 

Documentation