Identity Providers #
Pragma Engine enables cross-play, cross-progression, and cross-platform experiences by supporting multiple identity providers with account linking. This allows players to start on one platform and link their account when switching to another platform.
Identity providers are linked to a Pragma Account and used for authentication and platform-specific social integration. These accounts are isolated from player and social data to enable seamless cross-platform experiences.
Test provider #
The Pragma Engine test provider uses the name Unsafe Provider
to indicate that it’s only for internal and testing use cases and should not be enabled in production. It can also be used in load testing to allow the creation of millions of test accounts.
When run in development mode, the platform will populate the Test Provider with default accounts (test01
- test20
). Below is an example of how to enable the Unsafe Identity Provider:
social:
serviceConfigs:
UnsafeIdentityDaoConfig:
databaseConfig:
username: "username"
password: "password"
hostPortSchema: "host-port-schema"
pluginConfigs:
AccountService.identityProviderPlugins:
plugins:
Unsafe:
class: "pragma.account.UnsafeIdentityProviderPlugin"
Configure identity providers #
Pragma Engine is highly configurable. You can enable additional plugins and custom services via the config files located in the 5-ext/config
directory. Add the relevant configuration code blocks to local-dev.yml
(for testing) or common.yml
(for production) under the social
section.
For identity providers not listed, studios can implement a custom Identity Provider Plugin. See the Custom Identity Provider concepts page for more information.
Inform third party platforms of Pragma OAuth redirect URIs #
Any identity provider that uses OAuth requires a list of authorized redirect URIs to allow the Pragma Engine platform to authenticate with it.
These are redirect URIs you’ll need to configure on the third party platform.
Data classes #
Id Provider Account #
IdProviderAccount
contains third party user identification information that Pragma uses to create and authenticate accounts.
property | description |
---|---|
idProvider | enum of the identity provider. See the Identity Provider table for details. |
accountId | string Unique identitifer that the third party uses to associate a player with their account. |
displayName | string Display name that the third party provider has for a user on their interface. |
discriminator | string Unique characters added to the end of an account name to identify them. If the third party does not use a distriminator, set as an empty string. |
Error types #
error type | description |
---|---|
AccountService_IdProviderMissing | Identity provider is not configured in Pragma Engine. |
AccountService_InvalidIdProvider | Identity provider enum type does not exist in IdProvider or ExtIdProvider enums. |
AccountService_IdProviderLinkingDisabled | accountLinkingEnabled config value is set to false for this identity provider. |
AccountService_IdProviderAlreadyAssociated | Identity provider account is already linked to an existing Pragma Account. Ex: The same Steam account can not be linked to two separate Pragma Accounts. |
AccountService_AccountAlreadyBoundToProviderType | A Pragma Account can not simultaneously be linked to the same identity provider type more than once. Ex: Two Steam accounts can not be linked to the same Pragma Account at the same time. |
AccountService_CannotUnlinkOnlyIdProvider | Identity provider is the last one linked to Pragma Account. Every Pragma Account needs at least one identity provider associated with it to be reachable. |
AccountService_IdProviderAuthenticationDisabled | playerLoginEnabled or operatorLoginEnabled config value is set to false for this identity provider. |
AccountService_Unauthorized | User does not meet authorization requirements for identity provider. Ex: Only users with a specific email domain can log in. |
AccountService_Unverified | User’s account has not been verified. Ex: email verification |
AccountService_IdProviderUnexpectedResponse | Pragma Engine received a response from the identity provider’s API that was unexpected. Ex: Steam service is down. |
Manage identity providers in Operator Portal #
Identity providers can be viewed and managed within the Operator Portal.
- From the Social Operator Portal, click Services, then click Accounts.
- Click on the relevant player name to view individual account information.
- View the player’s identity providers.
Unlinking an identity provider #
Removing an identity provider from an account is a permanent action and cannot be undone.
- From the Social Operator Portal, click Services, then click Accounts.
- Click on the relevant player name to view individual account information.
- View the player’s identity providers.
- Hover over the identity provider you’d like to remove and click unlink.
- Confirm you want to unlink the identity provider.
Alternatively, the following endpoints can be used to unlink an identity provider:
AccountRpc.UnlinkIdentityProviderAccountPartnerV1Request
AccountRpc.UnlinkIdentityProviderAccountServiceV1Request
AccountRpc.UnlinkIdentityProviderAccountOperatorV1Request
Filtering by identity provider #
Accounts can be filtered in Operator Portal by identity provider. This includes identity providers that are no longer used or disabled. For example, even if login is disabled for Steam, accounts will still appear when you filter by Steam in Operator Portal.
Hide a player’s identity providers information #
You can choose which identity providers are visible to other players using the config value visibleToOtherPlayers
.
Below is an example of how to hide the Steam identity provider from other players:
Steam:
class: "pragma.account.SteamIdentityProviderPlugin"
config:
appId: "1627080"
steamWebAPIKey: "3CD023D13769C48A24FDFCCB3398D68A"
visibleToOtherPlayers: false
Contents #
Topic | Description |
---|---|
Custom Identity Providers | Create a custom identity provider. |