Login via the default browser, not an in-app frame
Relay is awesome, but the recent OAuth change actually made it potentially less secure to log-in now, because it uses an Android web control instead of the user's browser.
Instead, would it be possible to open the OAuth window in a new browser instance or a Chrome custom tab?
An in-app browser frame is generally unsafe because:
- The user doesn't see that they're actually authenticating with Reddit (and not a fake website)
- Any browser plugins -- like auto-fill or a password manager -- are not available
- The user may already have a session in the main browser, dropping the need to log-in again
Plus, the in-app browser control could be less secure on older versions of Android. (Outdated SSL requirements, old certificate store, vulnerabilities, etc.)
I think Chrome custom tabs -- which still open up as part of your app (not as a new window in Recents) -- also allow you to query the current URL, so whatever you're doing now could still be done in that. (You could pick Chrome custom tabs if the default browser is Chrome (can apps check that?), or directly open the default browser otherwise)
What do you think?
Posted Apr 1, 2016, 11:51 AM UTC
You're not the first, and you won't be the last.
https://www.reddit.com/r/RelayForReddit/comments/4aw6br/whats_with_the_warning_message_reddit_gives_me/
u/DBrady is aware, and probably working on it. Last I heard was he was having trouble getting the token back from external browsers.
A user pointed me to this thread where talklittle (the Reddit Is Fun developer) tried to implement this. He ran into trouble with multiple accounts. That's kind of a deal breaker for moving over to this method of login.
This is all really unfortunate. OAuth is awesome, but I find it weird that Android doesn't provide a good way for people to implement it with multiple accounts for a given service.
Hopefully you and the devs of other clients can find a way to make it work. I'm with the other people who are comfortable with doing it "incorrectly", but I would definitely prefer a more proper implementation.
Also, thank you for all the time and effort you've put into Relay.