# EOS: how to refresh access token? After I login, it only works for 2 hours, then the game freezes

**URL:** <https://forums.unrealengine.com/t/eos-how-to-refresh-access-token-after-i-login-it-only-works-for-2-hours-then-the-game-freezes/1163637>\
**Category:** Multiplayer & Networking\
**Tags:** onlinesubsystem, online, unreal-engine, Multiplayer, CPP, question\
**Created:** [May 12, 2023, 2:47pm UTC](https://forums.unrealengine.com/t/eos-how-to-refresh-access-token-after-i-login-it-only-works-for-2-hours-then-the-game-freezes/1163637 "2023-05-12T14:47:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![JediKnightChan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jediknightchan/32/1156960_2.png) [@JediKnightChan](https://forums.unrealengine.com/u/JediKnightChan)\
**Post date:** [May 15, 2023, 12:01am UTC](https://forums.unrealengine.com/t/eos-how-to-refresh-access-token-after-i-login-it-only-works-for-2-hours-then-the-game-freezes/1163637/2 "2023-05-15T00:01:01Z")

</div>

> [@JediKnightChan](#):
>
> ```auto
> [/Script/OnlineSubsystemEOS.EOSSettings]
> CacheDir = CacheDir
> DefaultArtifactName = DefaultArtifact
> TickBudgetInMilliseconds = 0
> bEnableOverlay = False
> bEnableSocialOverlay = False
> bShouldEnforceBeingLaunchedByEGS = False
> TitleStorageReadChunkLength = 0
> +Artifacts = (ArtifactName="DefaultArtifact",ClientId="...",ClientSecret="....",ProductId="....",SandboxId="...",DeploymentId="....",EncryptionKey="...")
> bUseEAS = False
> bUseEOSConnect = False
> bMirrorStatsToEOS = False
> bMirrorAchievementsToEOS = False
> bUseEOSSessions = False
> bMirrorPresenceToEAS = False
> 
> [OnlineSubsystemEOS]
> bEnabled=true
> 
> [OnlineSubsystem]
> DefaultPlatformService=EOS
> 
> [/Script/Engine.GameEngine]
> +NetDriverDefinitions = (DefName="GameNetDriver",DriverClassName="OnlineSubsystemEOS.NetDriverEOS",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
> 
> [/Script/OnlineSubsystemEOS.NetDriverEOS]
> bIsUsingP2PSockets=true
> 
> ```

Need to change `bUseEAS` from `False` to `True` and add `NativePlatformService=EOS` to `[OnlineSubsystem]`

---

_[View the full topic](https://forums.unrealengine.com/t/eos-how-to-refresh-access-token-after-i-login-it-only-works-for-2-hours-then-the-game-freezes/1163637)._
