Authenticate with Epic Online Services #

In this section, we’ll log into the platform with Epic Online Services (EOS). This method is appropriate for use in production. An EOS account is required to complete this section.

Complete Set Up the Unity SDK and Log Into the Platform before starting this section.

Initial setup #

Register your application with EOS #

Log in or create a new Epic Account via the Epic Games login page.

After logging in, head to the EOS Dev Portal by clicking on the blue Dev Portal button in the top right corner of the page or by using the provided link.

Follow the official EOS docs to get started with account and application setup.

Configure your application #

Once you have created an EOS application, you will need to configure it. Navigate to the EOS Dev Portal, then click your application’s Epic Account Services button.

You will see three categories that you can configure: Brand Settings, Permissions, and Linked Clients. You will eventually need to configure Brand Settings, but for internal development purposes, only Permissions and Linked Clients are necessary. Follow the previously-linked official EOS documentation for guidance.

Download the EOS SDK #

You can download the EOS SDK from your application’s landing page in the EOS Dev Portal. Click the Download SDK button, then select C# SDK under SDK Type. The version dropdown defaults to the latest available version; you can select a previous version if desired. Click the download button to download the SDK.

As part of the SDK, Epic provides a DevAuthTool in the SDK/Tools directory that you can authenticate against while developing locally.

Configure Pragma Engine #

Insert the following configuration into your 5-ext/local-dev.yml to enable the EOS identity provider plugin:

social:
  pluginConfigs:
    AccountService.identityProviderPlugins:
      plugins:
        Epic:
          class: "pragma.account.EpicIdentityProviderPlugin"
          config:
            clientId: "epic-client-id"
            clientSecret: "encrypted-epic-client-secret"
            redirectUri: "http://localhost:11200/v1/account/oauth-redirect/EPIC"
            restrictByCatalogItemOwnership: true
            deploymentId: "epic-deployment-id"
            sandboxId: "epic-sandbox-id"
            catalogItemId: "epic-catalog-item-id"
            playerLoginEnabled: true
            operatorLoginEnabled: false
            accountLinkingEnabled: true
            showPortalLoginButton: false