Epic Games sign-in

Players choose Epic Games on the hosted login page, on the device approval page or when they save a guest's progress, and sign in with their Epic Games account. You need an Epic Account Services application and a client from the Epic Developer Portal.

1. Set up Epic Account Services

  1. In the Epic Developer Portal, open your product. Under Epic Account Services, create an application and complete the brand settings Epic asks for. The Basic Profile permission is always on; auth4.dev doesn't need any other permission.
  2. Under Product Settings, open the Clients tab and create a client for the web. Copy its Client ID and Client secret. Keep the secret somewhere safe.
  3. Edit the client and add this redirect URL, replacing {projectId} with your Project ID:
    https://auth.auth4.dev/t/{projectId}/identity/epic/callback
    The console shows the exact URL with a copy button on the Epic Games card. It must match exactly.
  4. Back in your Epic Account Services application, link the client to it underLinked Clients.

Until Epic has approved your application's brand review, only accounts Epic lets you test with can sign in. Check your application's status in the portal before you launch.

2. Connect it in the console

On the project's sign-in methods page, under Epic Games:

  1. Paste the client ID into Epic client ID.
  2. Paste the secret into Client secret.
  3. Tick Enable Epic Games sign-in.
  4. Select Save Epic Games settings.

Only project owners can change these settings; admins and viewers see them read-only. The secret is write-only: it is stored encrypted and can't be viewed again. To change it, create a new secret in the portal, enter it in Replace client secret and save. If you change the client ID you must also enter its secret.

Once Epic Games is on, players see it in three places:

  • Continue with Epic Games on the hosted login page.
  • Link an Epic Games account on the page where guests save their progress.
  • Continue with Epic Games on the device approval page.

Untick the box and save to turn Epic Games off. The option disappears from all three pages.

What identity data you get

  • Players are identified by their Epic Account ID (the ID token's sub). It is stored as the player's Epic Games identity and isn't put in your tokens. Key game data by your auth4.dev sub.
  • Epic doesn't share an email address. Under the default setting, hosted login asks Epic Games players for the verified email step until they have verified an address, the same way as Steam players. With the step off, they can add and verify an email address later.
  • Display names aren't stored. An Epic Games account and any other sign-in method areseparate players. They are joined only through account linking in the email step.
  • Epic's tokens and your client secret stay on the server. Your application only receives auth4.dev tokens.

Sending players straight to Epic Games

For a Sign in with Epic Games button, pass the provider to the browser SDK. The hosted login page then goes straight to Epic Games:

await auth4.login({ provider: "epic" });

login() sends provider_hint=epic. If you build the authorization request yourself, add that parameter. If Epic Games is off for the project, the page shows the usual list instead. See the API reference.

Linking Epic Games to a guest

A guest can save their progress by linking an Epic Games account. They keep the same user ID and stop being a guest. For a Save progress with Epic Gamesbutton, pass the provider so the upgrade page offers Epic Games first:

// Browser
await auth4.upgradeGuest({ provider: "epic" });
// Unity
var result = await client.UpgradeGuestAsync(Auth4Provider.Epic, onProgress, cts.Token);

The player still confirms on the page and can pick another enabled method. Only an Epic Games account that is new to your project moves to the guest; otherwise the upgrade fails with identity_in_use. Accounts are never merged. See upgradeGuest() and UpgradeGuestAsync.

Device approval

When Epic Games is on, the device approval page offers Continue with Epic Games. Players approve the game's code on a phone or PC with the Epic Games account they already use. Your game calls SignInWithDeviceAsync as usual; nothing changes on the game's side.

When something goes wrong

  • If the player cancels on Epic Games, the page says that Epic Games sign-in was cancelled and lets them choose another method.
  • If Epic Games is unreachable or refuses the request, the page reports a temporary problem and offers a retry. A wrong or replaced client secret shows up this way.
  • If Epic shows an error on its own page about the redirect URL, check that the client has the exact redirect URL and is linked to your Epic Account Services application.
  • If the Epic Games option doesn't appear, check that the box is ticked and a client ID and secret are saved. Incomplete configuration fails closed rather than showing a broken button.

Testing locally

Your app can run on localhost, but Epic Games sign-in itself always happens on the hosted pages and on Epic, so you need a real Epic Games account. Use a separate auth4.dev project for testing. To run the auth4.dev API itself against a local stand-in, see Testing locally on the Google page; the same setting covers Epic Games.