# Add an Epic Games IdP

Learn more about user login with Epic Games using the Epic Games Identity Provider.

> For the index of this section of the site, see [llms.txt](https://fusionauth.io/docs/llms.txt)

> **PLAN:** This feature requires [at least a Starter plan](https://fusionauth.io/docs/concepts/plans-and-limits/plans-features.md#starter-features).

Available since `1.28.0`

This section explains how to add a Login with Epic Games button to FusionAuth. Below is an example login page with the Epic Games Identity Provider enabled.

Once you have completed this configuration you will be able to enable the Epic Games login button for one or more FusionAuth Applications. Below is an example login page with the Epic Games Identity Provider enabled.

Here's a diagram of the login flow between:

*   the user
*   your application
*   FusionAuth and
*   a remote identity provider

```mermaid
sequenceDiagram
    participant User as User/Browser
    participant App
    participant FusionAuth
    participant IdentityProvider as Provider

    User ->> App : View Initial Page<br/>Click Login
    App ->> User : Displays Login Page<br/>Including Link To 'Login With Provider'
    User ->> App : Clicks On 'Login With Provider'
    App ->> User : Redirect To Provider Authorization URL
    User ->> IdentityProvider : Enters Credentials
    IdentityProvider ->> IdentityProvider : Validate Credentials
    IdentityProvider ->> User : Redirect to App With Authorization Code
    User ->> App : Requests Page, Has Authorization Code
    App ->> FusionAuth : Calls Complete Login<br/>With Code And Redirect URI
    FusionAuth ->> IdentityProvider : Exchanges Code And<br/>Redirect URI For Provider Token
    IdentityProvider ->> FusionAuth : Returns Provider Token
    FusionAuth ->> FusionAuth : Stores Provivider Token, Calls Lambda, Creates User And Registrations (If Needed), Generates FusionAuth Tokens
    FusionAuth ->> App : Return FusionAuth Tokens
    App ->> App : Create Session Or<br/>Otherwise Log User In
    Note over User, IdentityProvider: User Is Logged In And App Can Proceed<br/>Delivering Data And Functionality
```

Although this looks complex, the user only sees a few screens, such as the FusionAuth login screen, the provider login screen, and your application.

## Create an Epic Games Account

Follow instructions for obtaining a `Client id` and `Client secret` from [the Epic Games documentation](https://dev.epicgames.com/portal/).

## Create an Epic Games Identity Provider

To enable Epic Games for an Application or [CIMD Domain](https://fusionauth.io/docs/authentication/identity-providers.md#cimd-clients):

1.  Navigate to Settings -> Identity Providers .
    
2.  Click the Add provider dropdown and select Epic Games . This will take you to the Add Epic Games screen.
    
3.  Fill out the required fields; your identity provider can provide most of these values. For more information about the fields required for each identity provider, see the [documentation for your provider](https://fusionauth.io/docs/authentication/identity-providers.md).
4.  In the Applications configuration section at the bottom of this panel, find the name of your application or CIMD domain.
    
5.  To dynamically create FusionAuth user accounts (with default roles) for all users who successfully authenticate using this provider, select Create registration . If you disable this option, only an administrator with registration permissions can create new users for this application with access via Sign in with Epic Games.
    
6.  You should now see the Sign in with Epic Games button on the login page for the Pied Piper application.

![Add Epic Games](https://fusionauth.io/img/docs/lifecycle/authenticate-users/identity-providers/external-jwt/identity-provider-external-jwt-add.png)

![Epic Games Home](https://fusionauth.io/img/docs/screenshots/idp-epic-add.png)

### Form Fields

`Id`

*   Optional
*   Available since `1.61.0`

An optional UUID. When this value is omitted a unique Id will be generated automatically.

`Tenant`

*   Optional
*   Available since `1.62.0`

The tenant to which this identity provider belongs. This field only displays when the user selects a specific tenant on the previous page. When `Global identity provider` is selected on the previous page, this field does not display.

`Name`

*   Required
*   Available since `1.61.0`

A unique name to identify the identity provider. This name is for display purposes only and it can be modified later if desired.

`Client Id`

*   Required

The unique client identifier obtained from Epic Games. See [Epic Games - Getting Started](https://dev.epicgames.com/portal/).

`Client secret`

*   Required

The client secret obtained from Epic Games and used to authenticate the request. See [Epic Games - Getting Started](https://dev.epicgames.com/portal/).

`Button text`

*   Optional

The text to be displayed in the button on the login form. This value is defaulted to `Login with Epic Games` but it may be modified to your preference.

`Linking strategy`

*   Optional
*   Defaults to `Create a pending link`

The linking strategy for the Epic Games provider. [See Linking Strategies for more](https://fusionauth.io/docs/authentication/identity-providers.md#linking-strategies).

`Reconcile lambda`

*   Optional

A lambda maps custom claims returned from Epic Games to the FusionAuth User or Registration. To create or configure a lambda, navigate to Customizations -> Lambdas . [See the lambda documentation for more](https://fusionauth.io/docs/lambdas.md).

`Enable debug logging`

*   Optional
*   Defaults to `false`

Enable debug to create event log entries during the user login process. This will assist you in debugging integration issues.

## Building Your Own Integration

If you are building your own login experience, you'll want to start the identity provider flow yourself and then complete the login.

You might do this if you are using the [Login API](https://fusionauth.io/docs/apis/login.md) rather than using the hosted FusionAuth login pages. Here's a diagram illustrating this login flow:

```mermaid
sequenceDiagram
    participant User as User/Browser
    participant App
    participant FusionAuth
    participant IdentityProvider as Provider

    User ->> App : View Initial Page<br/>Click Login
    App ->> User : Displays Login Page<br/>Including Link To 'Login With Provider'
    User ->> App : Clicks On 'Login With Provider'
    App ->> User : Redirect To Provider Authorization URL
    User ->> IdentityProvider : Enters Credentials
    IdentityProvider ->> IdentityProvider : Validate Credentials
    IdentityProvider ->> User : Redirect to App With Authorization Code
    User ->> App : Requests Page, Has Authorization Code
    App ->> FusionAuth : Calls Complete Login<br/>With Code And Redirect URI
    FusionAuth ->> IdentityProvider : Exchanges Code And<br/>Redirect URI For Provider Token
    IdentityProvider ->> FusionAuth : Returns Provider Token
    FusionAuth ->> FusionAuth : Stores Provider Token, Calls Lambda, Creates User And Registrations (If Needed), Generates FusionAuth Tokens
    FusionAuth ->> App : Return FusionAuth Tokens
    App ->> App : Create Session Or<br/>Otherwise Log User In
    Note over User, IdentityProvider: User Is Logged In And App Can Proceed<br/>Delivering Data And Functionality
```

If you require a refresh token after completing the login, ensure **Enable JWT Refresh** is `true` in the application configuration. This is found in the Admin UI by navigating to Applications -> Your Application -> Security -> Login API settings .

Related

[Authentication Add a Nintendo IdP Learn more about user login with Nintendo using the Nintendo Identity Provider. gaming identity providersocial logingame platform login](https://fusionauth.io/docs/authentication/identity-providers/gaming/nintendo.md)

[Authentication Add an OpenID Connect with Discord IdP Learn how to set up user log in using Discord as an OpenID Connect Identity Provider. social logingaming identity provider](https://fusionauth.io/docs/authentication/identity-providers/gaming/discord.md)

[Authentication Add a Sony PlayStation Network IdP Learn more about user login with Sony PlayStation using the Sony PlayStation Identity Provider. gaming identity providersocial login](https://fusionauth.io/docs/authentication/identity-providers/gaming/sony.md)

[Authentication Add a Steam IdP Learn more about user login with Steam using the Steam Identity Provider. gaming identity providersocial login](https://fusionauth.io/docs/authentication/identity-providers/gaming/steam.md)
---

## Other pages in Gaming

> For the full index of this section, see [Authentication](https://fusionauth.io/docs/llms-authentication.txt).

- [Add an OpenID Connect with Discord IdP](https://fusionauth.io/docs/authentication/identity-providers/gaming/discord.md): Learn how to set up user log in using Discord as an OpenID Connect Identity Provider.
- [Add a Nintendo IdP](https://fusionauth.io/docs/authentication/identity-providers/gaming/nintendo.md): Learn more about user login with Nintendo using the Nintendo Identity Provider.
- [Add a Sony PlayStation Network IdP](https://fusionauth.io/docs/authentication/identity-providers/gaming/sony.md): Learn more about user login with Sony PlayStation using the Sony PlayStation Identity Provider.
- [Add a Steam IdP](https://fusionauth.io/docs/authentication/identity-providers/gaming/steam.md): Learn more about user login with Steam using the Steam Identity Provider.
- [Add a Twitch IdP](https://fusionauth.io/docs/authentication/identity-providers/gaming/twitch.md): Learn more about user login with Twitch using the Twitch Identity Provider.
- [Add an Xbox IdP](https://fusionauth.io/docs/authentication/identity-providers/gaming/xbox.md): Learn more about user login with Xbox using the Xbox Identity Provider.
