Repository navigation
Keep Discord sign-in in the web view instead of handing it to the Discord app - #156
Merged
Merged
Conversation
…cord app On Android, a sign-in page navigation that the web view is allowed to load was returned as "not handled", which lets the WebView pass it to whichever app claims it. A discord:// or intent:// page therefore opened the installed Discord app, which finished the login there, and tinyclient never read the token. Only web pages (and about, blob, data) load in the sign-in view now. Any other scheme is dropped and logged. Each allowed navigation logs its host, so a handoff that comes from a plain https link shows up in logcat too. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
On Android, Discord sign-in could hand off to the installed Discord app. Allowed navigations returned
falsefromshouldOverrideUrlLoading, so the WebView passed non-web URLs (discord://,intent://) to whichever app claims them. The login finished in the Discord app and tinyclient never read the token.Change
http,https,about,blob,dataload in the sign-in view. Other schemes are dropped and logged.sign-in navigation: <host>) for logcat.Testing
javacagainst android-36 compilesWebSignInActivity.java.🤖 Generated with Claude Code