HeroicBashLauncher icon indicating copy to clipboard operation
HeroicBashLauncher copied to clipboard

[Feature Request] cache epic authorization file for Epic games installed by heroic launcher using multiple epic accounts

Open shuozhifenxi opened this issue 1 year ago • 5 comments

Is your feature request related to a problem? Please describe. I installed several games by heroic launcher using multiple epic accounts. I found only the games associated with the epic account currently logged with heroic launcher can be played

Describe the solution you'd like Could we cache the user authorization file within the game start script so that all game installed by heroic launcher using multiple epic accounts can be played instantly?

Describe alternatives you've considered If the above solution is not possible, can we at least have a way to switch account in place (with saved username and password) without go to the heroic launcher (heroic launcher does not provide method to save passwords for multiple epic accounts) ?

Additional context Thank you very much in advance.

shuozhifenxi avatar Aug 20 '22 10:08 shuozhifenxi

Epic Store games are supposed to be launched via Legendary (the unofficial Epic Games launcher Heroic uses) for authorization and other purposes (updates, etc.). For instance, you cannot play some games like Rocket League directly via the exe file and is not recommended. Some other games will work.

I cannot implement this feature until Heroic does. And I'm pretty sure Heroic won't.

redromnon avatar Aug 20 '22 12:08 redromnon

For my understanding (please correct me if I am wrong), the Legendary has a command line based interface and there is an "legendary auth" command with the "--import" flag to import the authentication from the Epic Games Launcher (or Heroic launcher, in our case here), and the authentication file for Heroic laucher is just in the "/home/deck/.var/app/com.heroicgameslauncher.hgl/config/heroic/" directory. Could we backup the authentication file when heroicbashlauncher build the start script for the game and in the script, call the "legendary auth" command with the "--import" flag right before it try to run the game?

dadadawin avatar Aug 20 '22 12:08 dadadawin

That may be possible. I'm not sure how the --import flag exactly works.

There's even a legendary folder that holds the info about the logged-in user. Can you point out the authentication file that you've mentioned?

redromnon avatar Aug 20 '22 14:08 redromnon

That may be possible. I'm not sure how the --import flag exactly works.

There's even a legendary folder that holds the info about the logged-in user. Can you point out the authentication file that you've mentioned?

I think it is the file /home/deck/.var/app/com.heroicgameslauncher.hgl/config/heroic/legendary/user.json. Although I am not 100% sure that is the format that the command lagendary auth --import wants, it does have the very long token for authentication, so even the format is not correct I guess at least we can construct the required auth file based the info in it.

dadadawin avatar Aug 20 '22 17:08 dadadawin

Okay, so here's what Legendary's readme states -

Alternatively you can use the --import flag to import the authentication from the Epic Games Launcher (manually specifying the used WINE prefix may be required on Linux). Note that this will log you out of the Epic Launcher.

I think the user needs to mention the wine prefix path where EGS is installed (like if it's installed via Lutris).

redromnon avatar Aug 21 '22 10:08 redromnon