Skip to content

Authentication

Jakub Hubacek edited this page Oct 1, 2025 · 4 revisions

Authentication Subsystem

Location: godot_epic_extension/src/Authentication

Overview

The Authentication subsystem wraps EOS Auth/Connect and provides multiple login flows, logout handling, and exposes user identifiers and callbacks back to Godot. This subsystem handles all authentication-related operations for Epic Online Services integration.


Supported Functions

Function Description
Login(login_type, credentials) Implements epic_account, device_id, exchange_code, persistent_auth, account_portal, dev/developer flows. Performs validation of credentials where applicable
Logout() Initiates EOS logout on both Connect and Auth interfaces. Uses callbacks to finalize logout and reset state
IsLoggedIn() Returns internal is_logged_in flag
GetProductUserId() Returns local_user_id (EOS_ProductUserId). May be nullptr if not logged in
SetProductUserId(product_user_id) Sets local_user_id directly
GetEpicAccountId() Returns epic_account_id handle (may be nullptr)
GetDisplayName() Returns display_name cached after login or user info updates
GetLoginStatus() Returns EOS login status as int

Notes & Limitations

  • Platform Dependency: The implementation relies on the Platform subsystem being initialized and online; login/logout calls will fail early if the platform is not available

EOS SDK Coverage

Auth Functions

Mapping of EOS_Auth_ SDK functions* to implementation status:

EOS Function Status Notes
EOS_Auth_Login ✅ Yes Used in perform_epic_account_login() to perform Epic account logins
EOS_Auth_Logout ✅ Yes Used in Logout() and via on_auth_logout_complete
EOS_Auth_LinkAccount ❌ No LinkAccount not currently invoked by public API
EOS_Auth_CopyIdToken ❌ No Not used directly; ID token flow is available but not copied here
EOS_Auth_QueryIdToken ❌ No Not used
EOS_Auth_AddNotifyLoginStatusChanged ✅ Yes Registered in setup_notifications()
EOS_Auth_RemoveNotifyLoginStatusChanged ✅ Yes Removed in cleanup_notifications()

Connect Functions

Mapping of EOS_Connect_ SDK functions* to implementation status:

EOS Function Status Notes
EOS_Connect_Login ✅ Yes Used for device/dev/exchange_code/persistent auth flows via perform_device_id_login() and others
EOS_Connect_Logout ✅ Yes Used in Logout() to invalidate product user sessions
EOS_Connect_CreateDeviceId ❌ No Not directly called in current flows (device login uses credentials)
EOS_Connect_AddNotifyLoginStatusChanged ✅ Yes Registered in setup_notifications()
EOS_Connect_RemoveNotifyLoginStatusChanged ✅ Yes Removed in cleanup_notifications()

Clone this wiki locally