EOS_ELoginCredentialType

EOS API reference page for EOS_ELoginCredentialType

実装方法を選んでください。

C

C#

This enumerated type is part of the Auth Interface.

Remarks

All possible types of login methods, availability depends on permissions granted to the client.

See Also

EOS_Auth_Login, EOS_Auth_Credentials

Values

EOS_ELoginCredentialType

Enumerated Value

Meaning

EOS_LCT_Password

Login using account email address and password.

EOS_LCT_ExchangeCode

A short-lived one-time use exchange code to login the local user. When started, the application is expected to consume the exchange code by using the EOS_Auth_Login API as soon as possible. This is needed in order to authenticate the local user before the exchange code would expire. Attempting to consume an already expired exchange code will return EOS_EResult::AuthExchangeCodeNotFound error by the EOS_Auth_Login API.

EOS_LCT_PersistentAuth

Desktop and Mobile only; deprecated on Console platforms in favor of EOS_LCT_ExternalAuth login method. Long-lived access token that is stored on the local device to allow persisting a user login session over multiple runs of the application. When using this login type, if an existing access token is not found or it is invalid or otherwise expired, the error result EOS_EResult::EOS_InvalidAuth is returned. On Console platforms, after a successful login using the EOS_LCT_DeviceCode login type, the persistent access token is retrieved using the EOS_Auth_CopyUserAuthToken API and stored by the application for the currently logged in user of the local device.

EOS_LCT_DeviceCode

Deprecated and no longer used. Superseded by the EOS_LCT_ExternalAuth login method. Initiates a PIN grant login flow that is used to login a local user to their Epic Account for the first time, and also whenever their locally persisted login credentials would have expired.

  1. Game initiates the user login flow by calling EOS_Auth_Login API with the EOS_LCT_DeviceCode login type.

  2. The SDK internally requests the authentication backend service to begin the login flow, and returns the game a new randomly generated device code along with authorization URL information needed to complete the flow. This information is returned via the EOS_Auth_Login API callback. The EOS_Auth_LoginCallbackInfo::ResultCode will be set to EOS_Auth_PinGrantCode and the EOS_Auth_PinGrantInfo struct will contain the needed information.

  3. Game presents the device code and the authorization URL information on screen to the end-user.

  4. The user will login to their Epic Account using an external device, e.g. a mobile device or a desktop PC, by browsing to the presented authentication URL and entering the device code presented by the game on the console.

  5. Once the user has successfully logged in on their external device, the SDK will call the EOS_Auth_Login callback once more with the operation result code. If the user failed to login within the allowed time before the device code would expire, the result code returned by the callback will contain the appropriate error result. in the same user the next time they start the game. This avoids prompting the same user to go through the login flow across multiple game sessions over long periods of time. To do this, after a successful login using the EOS_LCT_DeviceCode login type, the game can call the EOS_Auth_CopyUserAuthToken API to retrieve a long-lived refresh token that is specifically created for this purpose on Console. The game can store the long-lived refresh token locally on the device, for the currently logged in local user of the device. Then, on subsequent game starts the game can call the EOS_Auth_Login API with the previously stored refresh token and using the EOS_LCT_PersistentAuth login type to automatically login the current local user of the device.

EOS_LCT_Developer

Login with named credentials hosted by the EOS SDK Developer Authentication Tool.

EOS_LCT_RefreshToken

Refresh token that was retrieved from a previous call to EOS_Auth_Login API in another local process context. Mainly used in conjunction with custom launcher applications. in-between that requires authenticating the user before eventually starting the actual game client application. In such scenario, an intermediate launcher will log in the user by consuming the exchange code it received from the Epic Games Launcher. To allow the game client to also authenticate the user, it can copy the refresh token using the EOS_Auth_CopyUserAuthToken API and pass it via launch parameters to the started game client. The game client can then use the refresh token to log in the user.

EOS_LCT_AccountPortal

Desktop and Mobile only. Initiate a login through the Epic account portal. for example when starting the application through a proprietary ecosystem launcher or otherwise.

EOS_LCT_ExternalAuth

Login using external account provider credentials, such as Steam, PlayStation(TM)Network, Xbox Live, or Nintendo. This is the intended login method on Console. On Desktop and Mobile, used when launched through any of the commonly supported platform clients. If the local platform account is already linked with the user's Epic account, the login will succeed and EOS_EResult::EOS_Success is returned. When the local platform account has not been linked with an Epic account yet, EOS_EResult::EOS_InvalidUser is returned and the EOS_ContinuanceToken will be set in the EOS_Auth_LoginCallbackInfo data. If EOS_EResult::EOS_InvalidUser is returned, the application should proceed to call the EOS_Auth_LinkAccount API with the EOS_ContinuanceToken to continue with the external account login and to link the external account at the end of the login flow.

  1. Game calls EOS_Auth_Login with the EOS_LCT_ExternalAuth credential type.

  2. EOS_Auth_Login returns EOS_EResult::EOS_InvalidUser with a non-null EOS_ContinuanceToken in the EOS_Auth_LoginCallbackInfo data.

  3. Game calls EOS_Auth_LinkAccount with the EOS_ContinuanceToken to initiate the login flow for linking the platform account with the user's Epic account.

    • During the login process, the user will be able to login to their existing Epic account or create a new account if needed.

  4. EOS_Auth_LinkAccount will make an intermediate callback to provide the caller with EOS_Auth_PinGrantInfo struct set in the EOS_Auth_LoginCallbackInfo data.

  5. Game examines the retrieved EOS_Auth_PinGrantInfo struct for a website URI and user code that the user needs to access off-device via a PC or mobile device.

    • Game visualizes the URI and user code so that the user can proceed with the login flow outside the console.

    • In the meantime, EOS SDK will internally keep polling the backend for a completion status of the login flow.

  6. Once user completes the login, cancels it or if the login flow times out, EOS_Auth_LinkAccount makes the second and final callback to the caller with the operation result status.

    • If the user was logged in successfully, EOS_EResult::EOS_Success is returned in the EOS_Auth_LoginCallbackInfo. Otherwise, an error result code is returned accordingly.

  7. Game calls EOS_Auth_Login with the EOS_LCT_ExternalAuth credential type.

  8. EOS_Auth_Login returns EOS_EResult::EOS_InvalidUser with a non-null EOS_ContinuanceToken in the EOS_Auth_LoginCallbackInfo data.

  9. Game calls EOS_Auth_LinkAccount with the EOS_ContinuanceToken to initiate the login flow for linking the platform account with the user's Epic account.

  10. EOS SDK automatically opens the local default web browser and takes the user to the Epic account portal web page.

    • The user is able to login to their existing Epic account or create a new account if needed.

    • In the meantime, EOS SDK will internally keep polling the backend for a completion status of the login flow.

  11. Once user completes the login, cancels it or if the login flow times out, EOS_Auth_LinkAccount invokes the completion callback to the caller.

    • If the user was logged in successfully, EOS_EResult::EOS_Success is returned in the EOS_Auth_LoginCallbackInfo. Otherwise, an error result code is returned accordingly.

Related API Members

This enumerated type is part of the Auth Interface.

Remarks

All possible types of login methods, availability depends on permissions granted to the client.

See Also

EOS_Auth_Login, EOS_Auth_Credentials

Values

Auth.LoginCredentialType

Enumerated Value

Meaning

Password

Login using account email address and password.

ExchangeCode

A short-lived one-time use exchange code to login the local user. When started, the application is expected to consume the exchange code by using the EOS_Auth_Login API as soon as possible. This is needed in order to authenticate the local user before the exchange code would expire. Attempting to consume an already expired exchange code will return EOS_EResult::AuthExchangeCodeNotFound error by the EOS_Auth_Login API.

PersistentAuth

Desktop and Mobile only; deprecated on Console platforms in favor of EOS_LCT_ExternalAuth login method. Long-lived access token that is stored on the local device to allow persisting a user login session over multiple runs of the application. When using this login type, if an existing access token is not found or it is invalid or otherwise expired, the error result EOS_EResult::EOS_InvalidAuth is returned. On Console platforms, after a successful login using the EOS_LCT_DeviceCode login type, the persistent access token is retrieved using the EOS_Auth_CopyUserAuthToken API and stored by the application for the currently logged in user of the local device.

DeviceCode

Deprecated and no longer used. Superseded by the EOS_LCT_ExternalAuth login method. Initiates a PIN grant login flow that is used to login a local user to their Epic Account for the first time, and also whenever their locally persisted login credentials would have expired.

  1. Game initiates the user login flow by calling EOS_Auth_Login API with the EOS_LCT_DeviceCode login type.

  2. The SDK internally requests the authentication backend service to begin the login flow, and returns the game a new randomly generated device code along with authorization URL information needed to complete the flow. This information is returned via the EOS_Auth_Login API callback. The EOS_Auth_LoginCallbackInfo::ResultCode will be set to EOS_Auth_PinGrantCode and the EOS_Auth_PinGrantInfo struct will contain the needed information.

  3. Game presents the device code and the authorization URL information on screen to the end-user.

  4. The user will login to their Epic Account using an external device, e.g. a mobile device or a desktop PC, by browsing to the presented authentication URL and entering the device code presented by the game on the console.

  5. Once the user has successfully logged in on their external device, the SDK will call the EOS_Auth_Login callback once more with the operation result code. If the user failed to login within the allowed time before the device code would expire, the result code returned by the callback will contain the appropriate error result. in the same user the next time they start the game. This avoids prompting the same user to go through the login flow across multiple game sessions over long periods of time. To do this, after a successful login using the EOS_LCT_DeviceCode login type, the game can call the EOS_Auth_CopyUserAuthToken API to retrieve a long-lived refresh token that is specifically created for this purpose on Console. The game can store the long-lived refresh token locally on the device, for the currently logged in local user of the device. Then, on subsequent game starts the game can call the EOS_Auth_Login API with the previously stored refresh token and using the EOS_LCT_PersistentAuth login type to automatically login the current local user of the device.

Developer

Login with named credentials hosted by the EOS SDK Developer Authentication Tool.

RefreshToken

Refresh token that was retrieved from a previous call to EOS_Auth_Login API in another local process context. Mainly used in conjunction with custom launcher applications. in-between that requires authenticating the user before eventually starting the actual game client application. In such scenario, an intermediate launcher will log in the user by consuming the exchange code it received from the Epic Games Launcher. To allow the game client to also authenticate the user, it can copy the refresh token using the EOS_Auth_CopyUserAuthToken API and pass it via launch parameters to the started game client. The game client can then use the refresh token to log in the user.

AccountPortal

Desktop and Mobile only. Initiate a login through the Epic account portal. for example when starting the application through a proprietary ecosystem launcher or otherwise.

ExternalAuth

Login using external account provider credentials, such as Steam, PlayStation(TM)Network, Xbox Live, or Nintendo. This is the intended login method on Console. On Desktop and Mobile, used when launched through any of the commonly supported platform clients. If the local platform account is already linked with the user's Epic account, the login will succeed and EOS_EResult::EOS_Success is returned. When the local platform account has not been linked with an Epic account yet, EOS_EResult::EOS_InvalidUser is returned and the EOS_ContinuanceToken will be set in the EOS_Auth_LoginCallbackInfo data. If EOS_EResult::EOS_InvalidUser is returned, the application should proceed to call the EOS_Auth_LinkAccount API with the EOS_ContinuanceToken to continue with the external account login and to link the external account at the end of the login flow.

  1. Game calls EOS_Auth_Login with the EOS_LCT_ExternalAuth credential type.

  2. EOS_Auth_Login returns EOS_EResult::EOS_InvalidUser with a non-null EOS_ContinuanceToken in the EOS_Auth_LoginCallbackInfo data.

  3. Game calls EOS_Auth_LinkAccount with the EOS_ContinuanceToken to initiate the login flow for linking the platform account with the user's Epic account.

    • During the login process, the user will be able to login to their existing Epic account or create a new account if needed.

  4. EOS_Auth_LinkAccount will make an intermediate callback to provide the caller with EOS_Auth_PinGrantInfo struct set in the EOS_Auth_LoginCallbackInfo data.

  5. Game examines the retrieved EOS_Auth_PinGrantInfo struct for a website URI and user code that the user needs to access off-device via a PC or mobile device.

    • Game visualizes the URI and user code so that the user can proceed with the login flow outside the console.

    • In the meantime, EOS SDK will internally keep polling the backend for a completion status of the login flow.

  6. Once user completes the login, cancels it or if the login flow times out, EOS_Auth_LinkAccount makes the second and final callback to the caller with the operation result status.

    • If the user was logged in successfully, EOS_EResult::EOS_Success is returned in the EOS_Auth_LoginCallbackInfo. Otherwise, an error result code is returned accordingly.

  7. Game calls EOS_Auth_Login with the EOS_LCT_ExternalAuth credential type.

  8. EOS_Auth_Login returns EOS_EResult::EOS_InvalidUser with a non-null EOS_ContinuanceToken in the EOS_Auth_LoginCallbackInfo data.

  9. Game calls EOS_Auth_LinkAccount with the EOS_ContinuanceToken to initiate the login flow for linking the platform account with the user's Epic account.

  10. EOS SDK automatically opens the local default web browser and takes the user to the Epic account portal web page.

    • The user is able to login to their existing Epic account or create a new account if needed.

    • In the meantime, EOS SDK will internally keep polling the backend for a completion status of the login flow.

  11. Once user completes the login, cancels it or if the login flow times out, EOS_Auth_LinkAccount invokes the completion callback to the caller.

    • If the user was logged in successfully, EOS_EResult::EOS_Success is returned in the EOS_Auth_LoginCallbackInfo. Otherwise, an error result code is returned accordingly.

Related API Members

タグ