portablemc icon indicating copy to clipboard operation
portablemc copied to clipboard

Unable to login with Microsoft's secondary alias email

Open xhayper opened this issue 1 year ago • 3 comments

When trying to log in using Microsoft's alias email feature, the following error show up.

[  ..  ] Processing authentication against Minecraft services...
[FAILED] Incoherent authentication data, please retry.

I tried logging in with the Minecraft launcher and was able to login

xhayper avatar Mar 18 '24 02:03 xhayper

Caused by https://github.com/mindstorm38/portablemc/blob/e98452a9bf0915d89f64d688e78e2de0dfb8f9fa/portablemc/auth.py#L263

id_token_payload["email"].casefold() == email.casefold()

The payload return the primary alias instead of the email we used to login

xhayper avatar Mar 18 '24 03:03 xhayper

image Did some more digging and it turns out the email scope return the primary email

xhayper avatar Mar 18 '24 03:03 xhayper

I made this so users could not login with another account than the one they specified in the command line. Didn't know that alias existed..

mindstorm38 avatar Mar 18 '24 08:03 mindstorm38