Would be good to perhaps get the app to open external links in the browser. I managed to get back to log in by pressing back which logged me out of HA :(.
This can be done by using shouldOverrideUrlLoading.
The only issue I can see about this is that there might be instances where you want authenticate using the HA OAuth for account linking or possibly other things.
OAuth account linking should work just fine in an external browser, as the authorize callback endpoints do not require authentication.
I have my Home Assistant instance running behind an NGINX reverse proxy. To add an extra layer of security, I set up NGINX to use Google OAuth. When I manually enter the external URL to reach my HA instance, it shows me the "Sign in with Google" button (as it should) but when I tap that, I get a 403 error: disallowed_useragent
Would this enhancement fix that problem?
@fanaticDavid that is a duplicate of #45
As another data point, I have a weblink set up in HA that I click on that has its own authentication. Opening it in a browser allows me to enter username/password, however if I click the link from within the HA app it skips authentication and just goes straight to the not authorized error.
I'd love to see either the option to open these links in an external browser, or for the internal browser to support authenticated websites.
When I manually enter the external URL to reach my HA instance, it shows me the "Sign in with Google" button (as it should) but when I tap that, I get a 403 error:
disallowed_useragent
This is because of:
_As of April 20, 2017, Google has blocked OAuth authorization requests via web views. Unfortunately, a lot of developers have not migrated their current apps away from using embedded browsers to make such requests. Therefore, users trying to use their Google accounts to sign in to third party apps that still make use of web views for OAuth logins constantly get the dreaded 403 disallowed_useragent error._
More info here:
https://auth0.com/blog/google-blocks-oauth-requests-from-embedded-browsers/
I also stuck on this, so +1 for handling authentication in external browser
Another reason for this is links which can be opened in a native Android app, for example links to Reddit posts (I have a feed of these in HA). In the old PWA these will open in the Reddit app. In the new app they will open the Reddit site in the webview, and clicking the option to open in the app fails with net::ERR_UNKNOWN_URL_SCHEME
Most helpful comment
This is because of:
_As of April 20, 2017, Google has blocked OAuth authorization requests via web views. Unfortunately, a lot of developers have not migrated their current apps away from using embedded browsers to make such requests. Therefore, users trying to use their Google accounts to sign in to third party apps that still make use of web views for OAuth logins constantly get the dreaded 403 disallowed_useragent error._
More info here:
https://auth0.com/blog/google-blocks-oauth-requests-from-embedded-browsers/
I also stuck on this, so +1 for handling authentication in external browser