Home

PlayFab Auth

Learn how to interact with PlayFab Auth

PlayFab provides a comprehensive suite of live game management services, including server hosting, data analytics, and liveOps utilities to streamline game development and monetization. It is designed to empower developers with the tools needed to engage players and drive revenue, all while minimizing overhead and time to market.

Prerequisites#

To set up your PlayFab authentication with Openfort, you'll need to get the Project ID.

  1. Visit the PlayFab developer dashboard, select your title, and navigate to Settings wheel --> Title settings:
playfab title settings
  1. In the API Features section, copy your Title ID:
get playfab title id

Set up your provider#

To set up your PlayFab to authenticate players with Openfort, visit your dashboard provider settings.

playfab auth

Client-side Integration#

Where the identityToken is a client session ticket, available from any Client Login function.


_11
using System.Collections;
_11
using System.Collections.Generic;
_11
using UnityEngine;
_11
using Openfort.OpenfortSDK;
_11
using Openfort.OpenfortSDK.Model;
_11
public class openfortManager: MonoBehaviour {
_11
async void Start(string token) {
_11
OpenfortSDK openfort = await Openfort.Init(OPENFORT_PUBLISHABLE_KEY);
_11
await Openfort.AuthenticateWithThirdPartyProvider(new ThirdPartyProviderRequest(ThirdPartyOAuthProvider.Playfab, token, TokenType.CustomToken));
_11
}
_11
}

Uppon successful authentication, the SDK will return:

response.json

_12
{
_12
"id": "pla_cc9ed2b7-c5f5-4c43-8dca-c4b104ba1762",
_12
"object": "player",
_12
"createdAt": 1710976453,
_12
"linkedAccounts": [
_12
{
_12
"provider": "playfab",
_12
"disabled": false,
_12
"externalUserId": "2"
_12
}
_12
]
_12
}

Example#

Resources#