HMCL-dev / HMCL

A Minecraft Launcher which is multi-functional, cross-platform and popular
https://hmcl.huangyuhui.net
GNU General Public License v3.0
6.89k stars 676 forks source link

简化微软登录步骤 #2600

Open hejiehao opened 10 months ago

hejiehao commented 10 months ago

描述 Description

https://microsoft.com/link?otc= 后面加上代码就可以免去输入代码这一步骤

原因 Why

更加容易进行微软登录

burningtnt commented 10 months ago

https://microsoft.com/link 是由 Microsfot OAuth2 API 返回的 url,可能会在未来改变,HMCL 不应当做出此类假设。

zkitefly commented 10 months ago

https://github.com/PrismLauncher/PrismLauncher/blob/develop/launcher%2Fui%2Fdialogs%2FMSALoginDialog.cpp#L107-L117

参照 Prism Launcher 的做法,可判断是否为 https://www.microsoft.com/link,再添加 ?otc=

Sharll-large commented 9 months ago

纯好奇 pcl怎么做的()

burningtnt commented 9 months ago

纯好奇 pcl怎么做的()

直接账户密码登录,极不安全

hejiehao commented 9 months ago

纯好奇 pcl怎么做的()

类似于 wiki 上这样的吧 https://zh.minecraft.wiki/w/%E6%95%99%E7%A8%8B/%E7%BC%96%E5%86%99%E5%90%AF%E5%8A%A8%E5%99%A8?variant=zh-cn#Microsoft_%E8%B4%A6%E6%88%B7

zkitefly commented 9 months ago
https://login.live.com/oauth20_authorize.srf
 ?client_id=00000000402b5328
 &response_type=code
 &scope=service%3A%3Auser.auth.xboxlive.com%3A%3AMBI_SSL
 &redirect_uri=https%3A%2F%2Flogin.live .com%2Foauth20_desktop.srf

访问该网址,第一次登录需要账户与密码,之后返回网页链接就是授权码了

Screenshot_2024-01-06-16-49-49-54_df198e732186825c8df26e3c5a10d7cd.jpg