Skip to main content

Sessions and Account Management

Anonymous Accounts and Account Linking

When a player authenticates via any silent platform provider, the SDK automatically creates an anonymous CurseForge account tied to their platform identity. This happens without any action from you or the player.

Anonymous accounts have full access to subscriptions, ratings, and premium mods. They do not have a visible public profile on CurseForge.com and are not searchable by other users.

To associate an anonymous account with a full named CurseForge account (enabling a persistent public profile and cross-platform identity), direct the player to:

https://www.curseforge.com/account/connected-accounts

No SDK call is required. The account linking is handled entirely on the CurseForge web side. Once linked, the SDK picks up the association automatically on the next authentication.


Checking Authentication State

Before calling any authenticated API (subscriptions, ratings, premium mod entitlements), check whether the current session is already authenticated. The SDK persists tokens between sessions and re-validates them automatically during Initialize, so returning players are typically already authenticated when your first game frame runs.

bool bIsAuthenticated = CFCoreContext::GetInstance()->Authentication()->IsAuthenticated();

Blueprint: Call Is Authenticated, returns a boolean via delegate.

Call IsAuthenticated immediately after initialization to gate authenticated UI in your mod browser. If the player is not yet authenticated and you are on a platform with silent auth, trigger authentication transparently before opening the browser. If you are on a platform that relies on Email OTP, surface the sign-in prompt on demand rather than blocking game startup.


Logout

Calling Logout clears the locally stored auth token. The player will need to re-authenticate on the next session. On platforms with silent auth, re-authentication is transparent and automatic. On Email OTP platforms, the player will need to re-enter their credentials.

CFCoreContext::GetInstance()->Authentication()->Logout(
[]() { /* Logged out — update your UI state */ },
[](const FCFCoreError& Error) { /* Handle error */ });

Blueprint: Call Logout.