メインコンテンツまでスキップ

Epic をアイデンティティプロバイダーとして設定する

Last updated on August 5, 2026

注釈:本資料はAI技術を用いて翻訳されています。

概要

このガイドは、検証済みの Epic Games デベロッパーが Epic Games アカウントを AccelByte Gaming Services (AGS) に接続する際の手助けとなることを目的としています。お使いのゲームによっては、ここに記載されていない Epic Games サービス内の追加機能を設定する必要がある場合があります。Epic Games サービスの設定に関する完全な情報については、Epic Games の担当者に直接問い合わせて、Epic Games ドキュメントを確認することをお勧めします。

important

このガイドは公開利用を目的としており、機密性の理由から限られた情報のみを含んでいます。まずは完全な機密ガイドを参照することをお勧めします。機密ガイドのコピーをリクエストするには、AccelByte のテクニカルプロデューサーに問い合わせてください。

目標

  • AccelByte Game SDK を使用して、ゲームで Epic 認証方式を有効にする。
  • AccelByte Player Portal を使用して、パブリッシャーの Web サイトで Epic 認証方式を有効にする。

前提条件

Web ログイン統合

  • Epic デベロッパーアカウント。
  • 認証を設定し権限を管理するための AccelByte Admin Portal アカウント。
  • Player Portal と Launcher 用のパブリッシャー Namespace。
  • Player Portal。
AGS Public Cloud

Web ログイン統合は現在 AGS Public Cloud では利用できず、AGS Private Cloud でのみサポートされています。

インゲームログイン統合

  • Epic デベロッパーアカウント。
  • Unreal Engine を使用する場合は、UE バージョン 4.27 または 5.0 のインストールが必要です。
  • Unity を使用する場合は、PlayEveryWare/eos_plugin_for_unity が必要です。
  • 認証を設定し権限を管理するための AccelByte Admin Portal アカウント。
  • ゲーム Namespace。
  • AccelByte Game SDK の最新版がインポートされた Unity または Unreal ゲームプロジェクト。
  • AGS Identity and Access Management (IAM) クライアントに関する知識。

Epic プロダクトの設定

組織の作成

デベロッパーアカウント配下の組織 (Organization) が必要であり、その組織に検証済みのドメインを追加する必要があります。

注記

Epic によるドメインの検証には多少時間がかかります。

プロダクトブランドの設定

プロダクトのブランド設定、権限、およびリンクされたクライアントを設定します。EOS Epic Account Services のセットアップ方法ガイドに従ってください。

注記

ブランド設定には検証済みのドメインが必要です。ドメインをお持ちでない場合はそのまま進めることもできますが、プレイヤーはログイン時に警告メッセージを受け取ります。詳細については、ドメイン検証のページを参照してください。

クライアントの作成

プロダクト配下にクライアントを作成します。新しいクライアントの追加ガイドに従ってください。

Epic Account Services アプリケーションの作成

アプリケーションを作成します。EOS Epic Account Services アプリケーションのセットアップガイドに従ってください。

  • 権限 (Permissions) では、Basic Profile、Online Presence、および Friends List を有効にする必要があります。
  • リンクされたクライアント (Linked Clients) では、以前に作成したクライアントを選択します。
注記

Epic デベロッパーポータルでの設定に問題がある場合は、カスタマーサポートに問い合わせて AccelByte からガイドを入手してください。

AGS で Epic Games ログインプロバイダーを設定する

Web ログイン

パブリッシャーの Web サイト向けに Epic Games ログインを設定すると、プレイヤーは自分の Epic Games アカウントでその Web サイトにサインインできるようになります。設定するには、次の手順に従います。

設定手順

  1. AGS Admin Portal で、パブリッシャーの namespace に移動します。

  2. サイドバーメニューで、Foundations > 3rd Party Integrations > Auth & Account Linking に移動します。

  3. Auth & Account Linking ページで、+ Add New をクリックします。

    AccelByte Admin Portal Login

  4. Select login provider ページで、Gaming Platform タブの Epic Games を見つけてクリックします。

    Epic Login

  5. Set up Epic Games login provider フォームが表示されます。

    Epic Configuration

  6. 次のフィールドを入力します。

    • Platform ID: epicgames。自動的に設定されるため、変更はできません。
    • Client ID: Epic Games アプリケーションの Client ID。
    • Client secret: Epic Games アプリケーションの Client Secret。
    • Redirect URI: <BaseURL>/iam/v3/authenticate(BaseURL はドメインアドレスです。例: https://prod.gamingservices.accelbyte.io)。あわせて、以下の URI を Epic Games デベロッパーコンソールに許可済みリダイレクト URI として登録します。
      • <BaseURL>/iam/v3/authenticate
      • <BaseURL>/iam/v3/public/namespaces/<Namespace>/users/me/platforms/epicgames/web/link/establish(アカウント連携に使用)
    • Scopes(任意): デフォルトのスコープは basic_profilepresencefriends_list です。これらを削除できるほか、Enter キーを押すかカンマを入力して独自のスコープを追加することもできます。
  7. Add & Activate をクリックすると、プロバイダーの作成と有効化を 1 回の操作で実行できます。有効化せずに作成したい場合は、代わりに Add をクリックします。

注記

Epic Games 認証における platform_token は Access Token または Auth Code です。

ログインプロバイダーを編集する

  1. Auth & Account Linking ページで、Epic Games のプロバイダーをクリックします。

  2. 画面右側にプロバイダーの設定パネルが表示されます。必要に応じて各フィールドを更新します。

  3. パネル上部の Status トグルで、プロバイダーを有効化または無効化します。

    Epic Games login provider panel with Status toggle

  4. Save をクリックします。

試してみる

  1. Player Portal を開き、Login ボタンをクリックします。

Player Portal

  1. Epic Games のアイコンをクリックします。見つからない場合は、More login options をクリックしてください。

Login

  1. Login with Epic Games をクリックします。

More Login

  1. Epic Games の Web ログインページにリダイレクトされます。ここで Epic の認証情報を入力して先に進みます。以上で必要な手順は完了です。

Epic Games login

注記

現在、プレイヤーは自分の Epic アカウントを既存の AccelByte アカウントにリンクするか、新しいアカウントにリンクするかを求められます。AccelByte では、プレイヤーがヘッドレスアカウントで Player Portal に直接ログインできるように、この動作を設定可能にする取り組みが進行中です。

インゲームログイン

ゲーム内で Epic Games ログインを設定すると、プレイヤーは自分の Epic Games アカウントを使用してゲームにサインインできるようになります。設定するには、次の手順に従います。

設定手順

  1. AGS Admin Portal で、ゲームの namespace に移動します。

  2. サイドバーメニューで、Foundations > 3rd Party Integrations > Auth & Account Linking に移動します。

  3. Auth & Account Linking ページで、+ Add New をクリックします。

    AccelByte Admin Portal Login

  4. Select login provider ページで、Gaming Platform タブの Epic Games を見つけてクリックします。

    Epic Login

  5. Set up Epic Games login provider フォームが表示されます。

    Epic Configuration

  6. 次のフィールドを入力します。

    • Platform ID: epicgames。自動的に設定されるため、変更はできません。
    • Client ID: Epic Games アプリケーションの Client ID。
    • Client secret: Epic Games アプリケーションの Client Secret。
    • Redirect URI: デフォルトは http://127.0.0.1 です。この URL をそのまま、Epic Games デベロッパーコンソールに許可済みリダイレクト URI として登録します。
    • Scopes(任意): デフォルトのスコープは basic_profilepresencefriends_list です。これらを削除できるほか、Enter キーを押すかカンマを入力して独自のスコープを追加することもできます。
  7. Add & Activate をクリックすると、プロバイダーの作成と有効化を 1 回の操作で実行できます。有効化せずに作成したい場合は、代わりに Add をクリックします。

ログインプロバイダーを編集する

  1. Auth & Account Linking ページで、Epic Games のプロバイダーをクリックします。

  2. 画面右側にプロバイダーの設定パネルが表示されます。必要に応じて各フィールドを更新します。

  3. パネル上部の Status トグルで、プロバイダーを有効化または無効化します。

  4. Save をクリックします。

    Epic Games login provider panel with Status toggle

Epic Games 用の IAM クライアントを作成する

IAM クライアントとは、対象のプラットフォームでリリースしたいゲームクライアントを表すものです。IAM クライアントの詳細については、アプリケーションのアクセス制御を管理するを参照してください。

Unreal インゲームログイン統合

AccelByte SDK を使用してゲームのサインインを統合することで、プレイヤーが自分の Epic 認証情報を使ってゲームにログインできるようにします。

Unreal の準備と設定

依存関係の追加

まず、パブリック依存モジュールである OnlineSubsystemOnlineSubsystemEOS<YourProject>.Build.cs ファイルに追加する必要があります。これらは、Unreal Engine 内からオンラインサブシステム EOS を使用するようにプロジェクトを統合するために必要なすべての依存関係です。

public ABThirdPartyLogin(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" , "AccelByteUe4Sdk", "Slate", "SlateCore" });

PrivateDependencyModuleNames.AddRange(new string[] { "Json", "OnlineSubsystem", "OnlineSubsystemEOS", "HTTP" });

}

<YourProject>.Target.cs の内部に OnlineSubsystemEOS を追加します。

public ABThirdPartyLoginTarget( TargetInfo Target) : base(Target)
{
Type = TargetType.Game;
DefaultBuildSettings = BuildSettingsVersion.V2;
ExtraModuleNames.AddRange( new string[] { "ABThirdPartyLogin", "OnlineSubsystem", "AccelByteUe4Sdk", "OnlineSubsystemEOS" } );
}

<YourProject>.Target.cs および <YourProjectEditor>.Target.cs ファイルの内部に OnlineSubsystemSteam を追加します。

public ABThirdPartyLoginEditorTarget( TargetInfo Target) : base(Target)
{
Type = TargetType.Editor;
DefaultBuildSettings = BuildSettingsVersion.V2;
ExtraModuleNames.AddRange( new string[] { "ABThirdPartyLogin", "OnlineSubsystem", "AccelByteUe4Sdk", "OnlineSubsystemEOS" } );
}

Epic Games ログイン用の Unreal Engine プロジェクト設定

DefaultEngine.ini ファイル内に、Epic の設定用にいくつかの変数を追加する必要があります。この設定は、プロジェクトを開いたときに Epic Online Service が自動的に開始されるようにするために必要です。

Unreal Engine に Online Subsystem EOS を使用するよう指示するには、次の設定を追加します。

[OnlineSubsystem]
DefaultPlatformService=EOS

アプリケーションで EOS Online Subsystem を使用することを Unreal Engine に伝えたので、次に以下の設定を追加して OnlineSubsystemEOS モジュールを設定する必要があります。

[OnlineSubsystemEOS]
bEnabled=true

Epic Developer Portal から取得した値に基づいて、以下の値を入力できます。

[/Script/OnlineSubsystemEOS.NetDriverEOS]
bIsUsingP2PSockets=true

[/Script/OnlineSubsystemEOS.EOSSettings]
CacheDir=CacheDir
DefaultArtifactName=YOUR Product Name
TickBudgetInMilliseconds=0
bEnableOverlay=True
bEnableSocialOverlay=True
bShouldEnforceBeingLaunchedByEGS=False
TitleStorageReadChunkLength=0
+Artifacts=(ArtifactName="[Your Product Name]",
ClientId="[Your Client ID]",//This ID should start with "xyz" as the first 3 characters
ClientSecret="[Your Client Secret]",//This is the password that is used to verify your Client ID
ProductId="[Your Product ID]",//The EOS SDK uses this ID to identify your product
SandboxId="[Your Sandbox ID]",//The artifact belongs to the sandbox with this ID value.
DeploymentId="[Your Deployment ID]",//Deployment IDs differ for each artifact
EncryptionKey="[Your Encyption Key]")//When you upload data to an EOS service, this 64-byte hexadecimal string is used to encrypt it
bUseEAS=True
bUseEOSConnect=True
bMirrorStatsToEOS=True
bMirrorAchievementsToEOS=True
bUseEOSSessions=True
bMirrorPresenceToEAS=True

zUnreal Engine Project Setting for AccelByte Gaming Services
Add your AccelByte credentials here in DefaultEngine.ini
[/Script/AccelByteUe4Sdk.AccelByteSettings]
ClientId=<Your IAM_Client_Id>
ClientSecret=<Your IAM_Client_Secret>
Namespace=<Your Namespace>
PublisherNamespace=<Your Publisher Namespace>
RedirectURI=
BaseUrl="https://prod.gamingservices.accelbyte.io"
AppId=133xxx
IamServerUrl="https://prod.gamingservices.accelbyte.io/iam"
PlatformServerUrl="https://prod.gamingservices.accelbyte.io/platform"

Unreal Engine サンプルコードの実装

次に、以下のサンプルコードを使用して、ゲームに Epic 認証方式を実装する方法を説明します。 IOnlineSubsystemDefaultEngine.ini で定義された DefaultPlatformService の値を読み取ります。IdentityInterface は、ユーザーアカウントに関連するこれらのサービスとのやり取りを管理し、ユーザー認証とアクセストークンの取得を可能にします。操作が成功すると、AccelByte SDK の LoginWithOtherPlatform 関数が、Identity Interface から取得した認証トークンを使用してサードパーティプラットフォームのログインを処理します。

注記

スニペットで使用されている AccelByteOnlineSubsystemPtr を取得するには、このガイドに従ってください。

FOnlineAccountCredentials Credentials;
Credentials.Id = FString();
Credentials.Token = FString();
Credentials.Type = FString("accountportal");

UE_LOG(LogTemp, Warning, TEXT("%s"), TEXT("Begin Login"));
const IOnlineSubsystem* OnlineSubsystem = IOnlineSubsystem::Get();
if (OnlineSubsystem == nullptr)//will get active OSS Platform Service
{
FString Message = TEXT("Cannot login with no online subsystem set!");
UE_LOG(LogTemp, Warning, TEXT("%s"), *Message);
return;
}

const IOnlineIdentityPtr OnlineIdentity = OnlineSubsystem->GetIdentityInterface();
if (!OnlineIdentity.IsValid())
{
FString Message = TEXT("Could not retrieve identity interface from native subsystem.");
UE_LOG(LogTemp, Warning, TEXT("%s"), *Message);
return;
}
APlayerController* MyPlayerController = UGameplayStatics::GetPlayerController(GetWorld(), 0);;

const ULocalPlayer* LocalPlayer = Cast<ULocalPlayer>(MyPlayerController->Player);
if (LocalPlayer == nullptr)
{
FString Message = TEXT("Can only login with native platform for local players");
UE_LOG(LogTemp, Warning, TEXT("%s"), *Message);
return;
}

auto ApiClient = AccelByteOnlineSubsystemPtr->GetApiClient(TEXT("YOUR_KEY"));
auto UserApi = ApiClient->GetUserApi().Pin();

const FVoidHandler OnLoginSuccessDelegate = FVoidHandler::CreateLambda([&]() {
FAccountUserData AccountUserData = ApiClient->CredentialsRef->GetAccountUserData();
//if Success will return some user credential
FString AccountUserDataString;
FJsonObjectConverter::UStructToJsonObjectString(AccountUserData, AccountUserDataString);

FString Message = FString::Printf(TEXT("Login to AB Service Success : %s"), *AccountUserDataString);
});
const FErrorHandler OnLoginErrorDelegate = FErrorHandler::CreateLambda([=](int32 ErrorCode, const FString& ErrorMessage) {
FString Message = FString::Printf(TEXT("Error Login to AB Service : %s"), *ErrorMessage);//Failed Login to AB Service
});

const FOnLoginCompleteDelegate NativeLoginComplete = FOnLoginCompleteDelegate::CreateLambda([=]
(int32 LocalUserNum, bool bWasSuccessful, const FUniqueNetId& UserId, const FString& Error) {
UE_LOG(LogTemp, Warning, TEXT("OnLoginComplete %s : %s"), bWasSuccessful ? TEXT("Success") : TEXT("Fail"), *Error);
FString Message = FString::Printf(TEXT("OnLoginComplete %s : %s"), bWasSuccessful ? TEXT("Success") : TEXT("Fail"), *Error);
OnActionInfoUpdated.Broadcast(Message);

if (bWasSuccessful)
{
const FString PlatformToken = OnlineIdentity->GetAuthToken(LocalPlayer->GetControllerId());
UE_LOG(LogTemp, Warning, TEXT("PlatformToken : %s"), *PlatformToken);
OnActionInfoUpdated.Broadcast(FString::Printf(TEXT("PlatformToken : %s"), *PlatformToken));//Will Obtained Auth Ticket from OnlineIdentity

UserApi->LoginWithOtherPlatform(EAccelBytePlatformType::EpicGames, PlatformToken, OnLoginSuccessDelegate, OnLoginErrorDelegate);
UE_LOG(LogTemp, Warning, TEXT("Request LoginWithOtherPlatform"));
OnActionInfoUpdated.Broadcast(TEXT("Request LoginWithOtherPlatform"));
}//this method will hitting the AccelByte endpoint and will return value after success
});
OnlineIdentity->AddOnLoginCompleteDelegate_Handle(LocalPlayer->GetControllerId(), NativeLoginComplete);
const bool bWaitForDelegate = OnlineIdentity->Login(LocalPlayer->GetControllerId(), Credentials);
if (!bWaitForDelegate)
{
FString Message = TEXT("The online subsystem couldn't login");
UE_LOG(LogTemp, Warning, TEXT("%s"), *Message);
}

FString Message = TEXT("Sending login request to native subsystem!");
UE_LOG(LogTemp, Warning, TEXT("%s"), *Message);

このコードをプロジェクトに追加した後、プロジェクトをコンパイル、ビルド、実行します。これで完了です。

サンプルコードのテスト

以下の画像は、Epic アカウントを使用してテストアプリに正常にログインできた例を示しています。

Epic login with sample code