Project

General

Profile

Bug #268

oauth2redirect:// url scheme not supported?

Added by Kristian Rink 9 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Next Release
Start date:
04/04/2018
Due date:
% Done:

0%

Estimated time:

Description

Using Privacy Browser as my default browser, I just wanted to activate a mastodon account in tusky (Android mastodon client app). Signup will work like this:

(1) redirect to a given mastodon instance for web login and access granting
(2) redirect, the browser to an url like oauth2redirect://com.keylesspalace.tusky/?code=<.....>

The second step should launch / switch to the correct app (tusky, in this case) to complete registration. However, so far Privacy Browser, while hitting the oauth2redirect:// url, stops with an error complaining about an unknown URL scheme. Would it be possible to support this kind of login procedures? It would be great not to have to have a second browser around just for such purposes. ;)

History

#2 Updated by Soren Stoutner 8 months ago

  • Priority changed from 2.x to Next Release

It isn't clear to me exactly why this isn't working, but there should be some way to make Privacy Browser kick out custom protocols to the OS to select an application. It is probably some trick that needs to be applied to `shouldOverrideUrlLoading()`.

https://developer.android.com/reference/android/webkit/WebViewClient.html#shouldOverrideUrlLoading(android.webkit.WebView,%20java.lang.String)

#3 Updated by Kristian Rink 8 months ago

Ok, thanks for looking into it. Would be nice to see this working in a future version. :)

#4 Updated by Kristian Rink 8 months ago

Just along the way: The same seems to happen for market:// URLs that on other browsers make Android launch Play Store / F-Droid directly.

#5 Updated by Soren Stoutner 8 months ago

Yes, as it is setup now no custom URLs will work. Can you send me a link to a page that uses market:// URLs so that I can test the fix?

Also available in: Atom PDF