Identity Management & Player Authentication
🔹 Tools to use: Rave Social, BFG SDK
What is Identity Management?
Identity management is the process by which an app identifies the user. In casual games, this refers to the identity of the player who is playing a game, allowing Big Fish to track player activities, such as when someone launches the game, levels up or purchases an item. When a player logs into the game using an authentication method, they can engage in a secure and continuous gameplay experience across multiple devices.
Games published by Big Fish use Rave Social (Rave) to track and manage players. Rave assigns a unique identifier to every player, even if they have not logged in to the game via an authentication method. This identifier, called a Rave ID follows the user through the lifetime of that player's account. Initially, the Rave ID is connected to an anonymous user and no personalized data is attached to the Rave ID. Once a player logs in to the game using an authentication provider (such as Facebook, Google, or SIWA), Rave connects the player's Rave ID to the chosen login method.
Rave is integrated directly into the BFG SDK. Prior to configuring Rave, you must first integrate the BFG SDK into your game code.
Enabling Rave
Enable Rave in the BFG SDK config file, bfg_config.json:
"rave": {
"RaveSettings.General.ApplicationID" : "<your Rave application ID>"
}
You must enable Rave in the BFG SDK using ApplicationID. Without this setting, the BFG SDK will crash upon initialization. You can get the ApplicationID from your Big Fish producer.
Additional Steps for Android
Add Rave dependencies to your app's Gradle file
Rave requires a set of dependencies to run and compile correctly. Add the following dependencies to your app's Gradle file:
implementation 'androidx.security:security-crypto:1.0.0'
implementation 'androidx.work:work-runtime:2.8.1'
implementation project(':RaveSocial')
implementation project(':XMLScene')
implementation project(':RaveFacebookPlugin') // Required for Facebook authentication
implementation project(':RaveGooglePlugin') // Required for Google authentication
implementation project(':RaveUtils')
implementation 'com.birbit:android-priority-jobqueue:2.0.1'
Add Facebook SDK to your app's Gradle file
Rave includes support for Facebook, and requires the Facebook SDK to run correctly. Even though the Facebook SDK is integrated into the BFG SDK, you must add the Facebook SDK to your app's Gradle file.
To find the supported version(s) of the Facebook SDK, see 3rd Party Version Compatibility Charts. Replace the version 1.2.3 in the example below with the appropriate version for the BFG SDK you are using.
implementation ('com.facebook.android:facebook-android-sdk:1.2.3')
Additional Steps for iOS
Update plist with Facebook values
If you are using Unity, we recommend that you use the BFG Build Processor to update the plist file automatically. Unity games can safely skip this step unless you prefer to manually configure your project without the BFG Build Processor.
This step is required for all games using the Native iOS SDK without Unity.
Add the following values to your game's plist file:
CFBundleURLTypes
A list of URL schemes supportd by the app. You will need to add at least two values: the Facebook URL scheme and the Bundle ID.
The Facebook URL scheme is based on your FacebookAppID value, preceded by the letters "fb". For example, if your FacebookAppID is "1234", then your Facebook URL scheme is "fb1234".
The Bundle ID is a unique key created for your game. You can get the Bundle ID from your Big Fish producer.
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb{facebook_app_id}</string>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
</array>
</dict>
</array>
FacebookAppID
A unique key given to every app created for Facebook. This value is required when using Facebook authentication. You can get the
FacebookAppIDfrom your Big Fish producer.
<key>FacebookAppID</key>
<string>{facebook_app_id}</string>
FacebookDisplayName
The user facing name of your app on Facebook. This value is required when using Facebook authentication.
<key>FacebookDisplayName</key>
<string>{PRODUCT_NAME}</string>
FacebookClientToken
A client token used to access app-level APIs that are embedded into your app. Your
FacebookClientTokenis found in your Meta app dashboard.
<key>FacebookClientToken</key>
<string>{facebook_client_token}</string>
LSApplicationQueriesSchemes
The URL schemes the app is able to launch from within your game. Each app is limited to 50 distinct query schemes and Facebook requires 4 of these schemes to function properly.
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fb-messenger-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
</array>
FacebookSKAdNetworkReportEnabled
A boolean value to turn on or off Facebook's SKAdNetwork reporting. Games published by Big Fish use AppsFlyer, which requires that Facebook's SKAdNetwork reporting is turned off. You must disable this setting in your plist.
<key>FacebookSKAdNetworkReportEnabled</key>
<false/>
FacebookAutoLogAppEventsEnabled and FacebookAdvertiserIDCollectionEnabled (Optional)
A boolean value to turn on or off Facebook reporting. By default, the BFG SDK programmatically disables the automatic reporting done by the Facebook SDK, in lieu of Big Fish's reporting services. Because of this, you may see warnings in your logs that Facebook reporting is disabled. These warnings can safely be ignored. However, if you want to clean up your log and remove these warnings, you can set these values to
FALSE.
<key>FacebookAutoLogAppEventsEnabled</key>
<string>FALSE</string>
<key>FacebookAdvertiserIDCollectionEnabled</key>
<string>FALSE</string>