-
Notifications
You must be signed in to change notification settings - Fork 874
设备代码流在完成授权后隐藏二维码 #6087
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
base: main
Are you sure you want to change the base?
设备代码流在完成授权后隐藏二维码 #6087
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -122,6 +122,7 @@ account.methods.microsoft.makegameidsettings=Create Profile / Edit Profile Name | |
| account.methods.microsoft.hint=Click the "Log in" button to start adding your Microsoft account. | ||
| account.methods.microsoft.methods.device=Log In with QR Code | ||
| account.methods.microsoft.methods.device.hint=Scan QR code or visit <a href="%s">%s</a> to complete login, enter <b>%s</b> in the opened page. | ||
| account.methods.microsoft.methods.device.hint.completed=Microsoft account authorization is now completed. There are some extra works for us, just wait for a while. | ||
|
CiiLu marked this conversation as resolved.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The English phrasing "There are some extra works for us" is grammatically incorrect (work is uncountable here) and sounds unpolished. A more standard phrasing would improve the user experience. |
||
| account.methods.microsoft.methods.browser=Log In via Browser | ||
| account.methods.microsoft.methods.browser.hint=Click the "Log in" button or <a href="%s">copy the link</a> and paste it into the browser to log in. | ||
| account.methods.microsoft.manual=<b>If your internet connection is bad, it may cause web pages to load slowly or fail to load altogether.\nYou may try again later or switch to a different internet connection.</b> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -160,6 +160,8 @@ private Result authenticateDevice(Options options) throws IOException, Interrupt | |
| continue; | ||
| } | ||
|
|
||
| options.callback.loginCompletedDeviceCode(); | ||
|
CiiLu marked this conversation as resolved.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The polling loop should handle other potential error responses from the token endpoint (e.g., if (tokenResponse.error != null) {
handleErrorResponse(tokenResponse);
throw new RemoteAuthenticationException(tokenResponse.error, tokenResponse.errorDescription, "");
}
options.callback.loginCompletedDeviceCode(); |
||
|
|
||
| return new Result(tokenResponse.accessToken, tokenResponse.refreshToken); | ||
| } | ||
| } | ||
|
|
@@ -268,6 +270,8 @@ public interface Callback { | |
|
|
||
| void grantDeviceCode(String userCode, String verificationURI); | ||
|
|
||
| void loginCompletedDeviceCode(); | ||
|
|
||
| /** | ||
| * Open browser | ||
| * | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.