-
-
Notifications
You must be signed in to change notification settings - Fork 238
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
Authenticating with a Microsoft account #782
Comments
As of now, minecraft does not use microsoft accounts and mojang did not
provide any technical details on how this will work.
So there is nothing to do, it will not work to try anything now.
Just wait for microsoft to enable this.
…On Tue, Dec 1, 2020, 22:24 Viktor Danov ***@***.***> wrote:
*Is your feature request related to a problem? Please describe.*
Mojang are transitioning to Microsoft authentication and intend to
completely switch over to it in the futureand I haven't been able to figure
out how to use my new Microsoft account with #createClient().
*Describe the solution you'd like*
It would be great for the package to treat Microsoft and Mojang accounts
equal, i.e. supply an email and a password for the username and password
ClientOptions
*Describe alternatives you've considered*
I've attempted to authenticate my Microsoft account with the access- and
clientTokens I extracted from my .minecraft/launcher-accounts.json file
but I'm not sure what username to supply. I've tried using my Microsoft
email, my Minecraft username, and my Xbox username (seeing as this one is
also saved in launcher-accounts.json I figured it was worth a shot).
*Additional context*
Add any other context or screenshots about the feature request here.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#782>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAR437UC2QOTUNW3BBKVCD3SSVNI5ANCNFSM4UJSHC6Q>
.
|
https://wiki.vg/Microsoft_Authentication_Scheme now we have some doc, implementation can start |
|
I don't think there's much else to reverse-engineer, it looks like standard Xbox auth the same way it's done on Bedrock. There's existing libraries as such that do this auth already, and a lot of complex docs from MS if anyone wants to read them. You don't need to even auth like the launcher, there's other non-oauth ways to sign in, as is done in https://github.com/minecraft-linux/msa/blob/0dd792abe72ee0526533765a89017255bb394ad5/src/network/server_config.cpp Oauth based, https://github.com/Sandertv/gophertunnel/tree/master/minecraft/auth Since the MS auth step is independent of the Xbox auth step, you can use any auth method as long as you use the valid scope with xbox permissions, the ms auth token is all you need to talk to the Xbox API. This can be done entirely programmatically, but not in a stable/practical way as there's lots of different ways to auth to microsoft (2FA, phone/email code w/o 2FA, password-based) and alot of errors that can happen to make it a really fragile process. I tried to make it work based on existing stuff (see here) but got blocked for a bit, so I'd recommend using a non-personal account for testing. Also tried out https://github.com/XboxReplay/xboxlive-auth - which seems up-to-date and I was able to get it working on a new testing ms account, although signins had to be approved seemingly randomly on the account page when I signed in. Though this may be because of a lot of authentication attempts, not sure. For node projects, the easiest way could be could be to use official @azure/node-msal for ms auth (since this does change somewhat often) + xboxlive-auth or build on top of xboxlive-auth. Presumably we could add support for both browser-based and also a credential based system for people with accounts that have passwords enabled without 2FA. |
I confirm that https://github.com/XboxReplay/xboxlive-auth is working, it can be tried with the code: const XboxLiveAuth = require('@xboxreplay/xboxlive-auth')
const email = 'xxxxxx'
const password = 'xxxxxx'
XboxLiveAuth.authenticate(email, password, {XSTSRelyingParty: 'rp://api.minecraftservices.com/'})
.then(console.info)
.catch(console.error) It needs a ms account with xbl enabled. |
If there is no XBOX Live Account associated with the Microsoft Account, you will recieve a 500 Status Code with a Generic INTERNAL_SERVER_ERROR reason.
|
now supported |
Is your feature request related to a problem? Please describe.
Mojang are transitioning to Microsoft authentication and intend to completely switch over to it in the future. I haven't been able to figure out how to use my new Microsoft account with
#createClient()
.Describe the solution you'd like
It would be great for the package to treat Microsoft and Mojang accounts equal, i.e. supply an email and a password for the
username
andpassword
ClientOptionsDescribe alternatives you've considered
I've attempted to authenticate my Microsoft account with the access- and clientTokens I extracted from my
.minecraft/launcher-accounts.json
file but I'm not sure what username to supply. I've tried using my Microsoft email, my Minecraft username, and my Xbox username (seeing as this one is also saved inlauncher-accounts.json
I figured it was worth a shot) but none has worked.The text was updated successfully, but these errors were encountered: