Documentation Index
Fetch the complete documentation index at: https://mintlify.com/legendary-gl/legendary/llms.txt
Use this file to discover all available pages before exploring further.
legendary auth establishes and manages your Epic Games Store login session. On first run — or after a logout — Legendary will attempt to open an embedded browser webview for a seamless login flow. When a webview is unavailable (for example on headless systems or when using the --disable-webview flag), Legendary opens https://legendary.gl/epiclogin in your default browser, displays the URL in the terminal, and asks you to paste the authorizationCode value from the JSON response. You can also authenticate non-interactively by providing an authorization code, exchange token, or session ID directly via flags, or by importing an existing session from the Epic Games Launcher.
Usage
Flags
Import authentication data from an existing Epic Games Launcher installation.
This transfers the active EGL session to Legendary. Note: importing will
log you out of the Epic Games Launcher. On Linux, you may need to specify the
WINE prefix path where EGL is installed if it cannot be detected automatically.
Use the specified authorization code instead of going through the
interactive login flow. Obtain a code from the Epic authorization endpoint or
the JSON response at
https://legendary.gl/epiclogin.Use the specified exchange token instead of the interactive login flow.
Exchange tokens are short-lived credentials that can be obtained from an
active Epic session.
Use the specified session ID instead of the interactive login flow.
Remove all stored authentication data (equivalent to logging out). Legendary
will require a new login before any authenticated command can be used.
Do not use the embedded browser webview for login even if one is available.
Legendary will fall back to printing the Epic login URL and prompting you to
paste the authorization code from the resulting JSON page.Note: The embedded webview requires
pywebview to be installed and is
currently not supported on macOS. On macOS the browser/code flow is always
used regardless of this flag.How Authentication Works
Check existing credentials
Legendary first checks whether stored credentials are still valid. If they
are, it reports the current login and exits — no new login is needed.
Choose a login method
If no valid credentials exist, Legendary selects a login method based on the
flags you provide and the runtime environment:
- Webview (default when available): Opens an embedded browser window. Complete the Epic login form and Legendary captures the session automatically.
- Browser + authorization code (fallback): Legendary opens
https://legendary.gl/epicloginin your system browser (or prints the URL if it cannot). After logging in, Epic returns a JSON object — copy only theauthorizationCodevalue and paste it into the terminal prompt. - Non-interactive (
--code,--token,--sid): Credentials are passed directly; no browser interaction is required. - EGL import (
--import): Legendary reads the active session from the Epic Games Launcher’s local data.
Examples
If you already have valid stored credentials, running
legendary auth will
simply confirm your current login and exit without prompting. To switch
accounts, first run legendary auth --delete, then authenticate again.