Skip to content

Fix Auth for External Auth#19

Open
Xytronix wants to merge 8 commits intoIroriPowered:masterfrom
Xytronix:ft-authstore
Open

Fix Auth for External Auth#19
Xytronix wants to merge 8 commits intoIroriPowered:masterfrom
Xytronix:ft-authstore

Conversation

@Xytronix
Copy link
Contributor

@Xytronix Xytronix commented Mar 7, 2026

Summary

Fixes authentication checks across update commands and the background update checker to support external auth stores. Adds OAuth token seeding from environment variables and CLI flags so the credential store works with externally-provided tokens.

This has been personally annoying me, they changed the priority of internal auth store with Update 3 to my knowledge.

Type of change

  • Bug fix (non-breaking)
  • New feature (non-breaking)
  • Breaking change (requires documentation/migration)
  • Chore / refactor
  • Documentation only

Implementation details

  • MixinUpdateCheckCommand, MixinUpdateDownloadCommand, MixinUpdateModule — redirects hasSessionToken checks to evaluate hasSessionToken || hasIdentityToken.
  • MixinServerAuthManager — injects at TAIL of initializeCredentialStore to seed OAuth tokens from CLI flags (--oauth-access-token, --oauth-refresh-token, --oauth-access-expires) or environment variables (HYTALE_SERVER_OAUTH_ACCESS_TOKEN, HYTALE_SERVER_OAUTH_REFRESH_TOKEN, HYTALE_SERVER_OAUTH_ACCESS_EXPIRES). Also provides a session/identity token fallback for getOAuthAccessToken when no OAuth token is available.
  • MixinOptions + RefixesOptions — registers OAuth CLI flags on Options.PARSER before parse via HEAD injection.

Checklist

  • Code compiles successfully
  • Pull request does not contain unrelated changes
  • Changes follow this project's code style (Use spotlessApply when necessary)
  • Changes are tested or will be tested after submission

- Add OAuth token seeding from env vars and CLI flags into credential store
- Register --oauth-access-token, --oauth-refresh-token, --oauth-access-expires CLI flags
- Add session/identity token fallback when OAuth unavailable
- Broaden update check/download auth to accept session tokens
- Gate seeding with PreferExternalAuth config option
- Add EarlyOptions.isSet() guard to prevent boot crash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant