Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/ms auth #216

Merged
merged 17 commits into from
Feb 12, 2022
Merged

Feature/ms auth #216

merged 17 commits into from
Feb 12, 2022

Conversation

dscalzi
Copy link
Owner

@dscalzi dscalzi commented Feb 9, 2022

Microsoft Authentication

This PR is the official solution for Microsoft Authentication with Helios Launcher.

Core authorization mechanisms are implemented in helios-core.

Using helios-core in Helios Launcher.

If the launcher depends on a published version of helios-core, it will be installed like any other dependency. If the version is unpublished (as with this PR), follow this guide:

  1. Clone helios-core
  2. In helios-core, run npm i, npm run build, npm link (https://docs.npmjs.com/cli/v8/commands/npm-link)
  3. In HeliosLauncher run npm link helios-core.
  4. Restart/reload your IDE.
    • For VS Code, open the command palette (ctrl+shift+p) and select Developer: Reload Window .
  5. You now have the unpublished version of helios-core linked.

PR Status - Complete ✅ (Final Review + Testing Required)

Complete ✅

  • Microsoft authentication implementation + unit tests in helios-core.
  • Microsoft support in AuthManager.
  • Differentiate between Microsoft and Mojang accounts in the settings view.
  • Add/remove (login/logout) Microsoft accounts in the settings view.
  • Option to login with Microsoft from the welcome view (first time login).
  • Integrate Microsoft login option when no accounts are left after logout.
  • Integrate Microsoft login option when logging in and no accounts are stored (not first-time).
  • Integrate Microsoft login option when selected account validation fails.
  • Friendly display of error codes if Microsoft authentication fails.
  • Documentation (md file) on how to get a client token.
  • Cleanup any remaining TODOs in the code during final review.

In Progress 🕒

None

ETA: Hoping to have this done by Sunday (Feb 13).

Note for Third-Party Launchers

Mojang accounts will no longer function as of March 10, 2022. If your launcher has not implemented Microsoft login, please integrate these changes. If your launcher has used a community implementation, you are free to continue using that. Please note that support is only provided for official solutions.

See https://www.minecraft.net/en-us/article/last-call-voluntarily-migrate-java-accounts

This code is not considered 'ready' until it is merged to master.

Please conduct your own internal testing before shipping to your users. If you find bugs which can be reproduced in the base HeliosLauncher, please report them. Thank you.

References

Thanks

This commit introduces support for Microsoft Authentication via the settings menu. There are a few known issues and TODOs which should not be hard to fix.
Once the auth flow from the settings screen is complete, the auth folow for first-time login (ie no accounts added yet) must be added. Should not be very difficult. The plan is to add one more view with two login buttons. The Mojang button will just bring you to the login page. The microsoft one will launch OAuth2.
@dscalzi dscalzi self-assigned this Feb 9, 2022
This was referenced Feb 9, 2022
@dscalzi dscalzi linked an issue Feb 9, 2022 that may be closed by this pull request
@dscalzi dscalzi mentioned this pull request Feb 9, 2022
Closed
@dscalzi dscalzi marked this pull request as ready for review February 10, 2022 02:44
@dscalzi
Copy link
Owner Author

dscalzi commented Feb 10, 2022

Might be better to accept the Azure Client ID from a .gitignored file that gets included in the final build.

@GeekCornerGH
Copy link
Contributor

Might be better to accept the Azure Client ID from a .gitignored file that gets included in the final build.

I don't think that's necessary

@dscalzi dscalzi merged commit 58e68c1 into master Feb 12, 2022
@dscalzi dscalzi deleted the feature/ms-auth branch February 12, 2022 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Microsoft authorization
2 participants