-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Oauth2 login not working on old Android #20018
Comments
|
The browser version is 7.1.2 as in my original report. I don't have Google Play configured on this device so installing Chrome might not be straightforward. Here's a screenshot of the error screen (@maltfield, can you confirm this is what you're seeing, too?): |
The bug could not be reproduced. I attempted to reproduce the issue by logging in through the "Sign in with OpenStreetMap" button. The web browser opened, I successfully logged into OpenStreetMap, and my account was displayed in the app. Please ensure you are using the official version of the app and let us know if the error continues. Alternatively, you can try logging in using the "Use username and password" button. OsmAnd~ 4.8.0#2460m, released: 2024-06-08 video_2024-06-08_13-52-10.mp4 |
I'm using the OSM version on F-Droid. The "Use username & password" option works as a workaround, but a comment in #20017 leads me to believe that won't be working for long. What browser do you have as default? I suspect that's related. |
I missed the request earlier to try https://osmand.net/map/ from my browser. That site, indeed, loads and works fine. |
As an experiment, I installed the monocles browser from F-Droid, a small, System WebView-based (I believe) alternative browser. After setting it as the default browser, starting the OAuth2 authentication flow from OSMand once more, then enabling cookies in the browser before logging in, it succeeded. I could then uninstall monocles and continue using the OAuth2 credentials. So, this seems a usable workaround for those suffering from this issue. |
If this bug exists with some browsers, then I think users should be able to copy and paste the keys directly between our own browser and the app. OsmAnd should have some "manually enter keys" option, and documentation should describe how to use this if the browser <--> OsmAnd connection is broken. |
Description
The oauth2 login flow does not work on an old Android 7.1.2 phone running LineageOS 14.1. The web browser opens, OSM login credentials are entered, then the browser appears to redirect to a URL
osmand-oauth://osmand.net/?code=XXX
and displays the message:Needless to say, OSM authorization was not been set in OSMand. The web browser in use is not Chrome but rather the Lineage default Browser application org.lineageos.jelly ver. 7.1.2. There was no issue with the oauth1 flow on this OS (which I haven't done in a couple of years).
I tried manually running
adb shell am start -a android.intent.action.VIEW -d 'osmand-oauth://osmand.net/?code=XXX'
but it returned the messageand while OSMand came to the foreground on the phone this time, it seemed to ignore the authorization code.
I don't think this is related to the improper oauth2 scope issue mentioned in #19966 (comment) because it's clearly an issue with the integration between browser and application.
Steps to reproduce
Choose Login to OpenStreetMap and follow the Sign in with OpenStreetMap flow.
Actual result
net::ERR_UNKNOWN_URL_SCHEME
Expected result
OSM is seamlessly authorized in OSMand
Your Environment (required)
The text was updated successfully, but these errors were encountered: