Google SSO auth from APP

Artem G10 months ago

Hi! I set up auth via google SSO. Through everything everything is OK, it works as it should. But through the application iOS (traccar manager) it is immediately blocked

Access blocked: Authorization Error
You can’t sign in from this screen because this app doesn’t comply with Google’s secure browsers policy. If this app has a website, you can open a web browser and try signing in from there.

You can let the app developer know that this app doesn’t comply with Google’s secure browsers policy. Learn more about this error
If you are a developer of Internal APP, see error details.
Error 403: disallowed_useragent

Anton Tananaev10 months ago

Yeah, I think they don't allow WebViews.

Artem G10 months ago

on google side i didn't find how to allow user agent

Artem G10 months ago

What do you advise? Or try to set up on the side of the google?

Anton Tananaev10 months ago

Not sure what can be done about it.

Samuel7 months ago
chripal3 months ago

Devs, maybe it is a solution for you:
If you use a webview widget in android/iOS,you can simply modify the UserAgent to achieve the goal(It seems to be working when specify the browser UserAgent)

webview.getSettings().userAgentString="Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Mobile Safari/537.36"

https://stackoverflow.com/questions/65353812/web-google-auth-workaround-for-403-disallowed-useragent-exists

Anton Tananaev3 months ago

Seems like a very hacky solution.

chripal3 months ago

I didn't test it but it looks good. I also have this bad issue with Google OAuth. It does not working for me on Traccar Manager Android app.

cguenther3 months ago

Stuck at this probable solution as well. Does anyone has tested it yet? Anton - maybe an advice for the ones who would like to test/try where to find the settings for userAgentString? Or - make it defineable through traccar.xml?

best regards
Carsten

Anton Tananaev3 months ago

It should be set in the source code.