angular-pwa-seed icon indicating copy to clipboard operation
angular-pwa-seed copied to clipboard

Auth issue when "Add to Home Screen" used in iOS

Open chetski opened this issue 8 years ago • 1 comments

This works fine when you browse to the site using iOS (iPhone/iPad) and the authentication works as expected. However, if you use the "Add to Home Screen" option and then launch the app from the home screen icon and try and login you get a 403 error with "disallowed_useragent". Here is the relevant bit from the error but see screen shot:

"This user-agent is not permitted to make an OAuth authorization request to Google as it is classified as an embedded user-agent (also known as a web-view). Per our policy, only browsers are permitted to make authorization requests to Google. We offer several libraries and samples for native apps to perform authorization requests in the browser."

I thought there wouldn't be any difference between using the app in the safari browser and using it via a home screen icon as they are both just using safari? image1

chetski avatar Jun 23 '17 11:06 chetski

Yes, i see that problem too.

Like this comment: https://stackoverflow.com/a/43834244 my guess is that a poor combined choices from Google and Apple put the users at this situation.

As soon as i can, i will take a look for some workaround (if any exists).

The current workaround is to remove the apple-mobile-web-app-capable when sign in with google (at least your ios users will be capable of use it).

jvitor83 avatar Jun 24 '17 01:06 jvitor83