Hi i have been trying for days now to fix this 403 error on iOS.
I am running the application from an actual phone.
I have tried running it with ionic cordova build ios --prod
i have tried to run it via XCode as well as directly from a console.
I have it working on my windows PC, my Mac in a browser, My Android Phone.
But no matter what i try, i can’t get passed the disallowed error on iOS.
I can get passed it by faking the user agent, but that is causing all sorts of other issues and i dont consider this a valid fix since at the end of it i still dont manage to login.
I have in these past days stuck on this tried a million things but amongst them i made sure i had in config.xml
<param name="ios-package" value="CDVWKWebViewEngine" />
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
I have also followed everything here : https://firebase.google.com/docs/auth/web/cordova as well as everything here : https://ionicframework.com/docs/native/firebase-authentication
Like i said i have been at this for days and i would use any kind of help at this point this is driving me insane i am just not sure what else to try.
What’s the user agent that isn’t allowed?
That might help us resolving the issue;
It does not tell me the user agent currently being used, would their be a way to know simply?
I also noticed by continuing to read more and more posts about this, that it doesn’t look like the plugin cordova-plugin-browsertab is doing its job to open the content outside of the app.
But knowing this hasn’t really lead me to an answer.
attaching the exact error.
The reason i say the plugin isn’t working to leave the app to do the authentication is because of the status bar, i have a custom colored one and i can see it in the attached screenshot. This isn’t the case on Android(where it works)
Using the Safari Devtools, you can see the requests made from your app (easiest via the emulator).
There you can see the complete request with the user-agent header.
ok i went into devloppement and inspected the app running, checked the request in question
user-agent came back with : User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 12_1_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16D39
this is from a iphone5 or 5+ i dont remember exactly
If I can provide anything else to help you help me just let me know what you would need from me
Can you try it on a more recent iPhone emulator?
Maybe Google blocks older devices.
It would be weird, but just to rule it out.
Same on a iPhone x. I know the plugin from Cordova isn’t doing its job popping out of the app like it does on my android phone. I build my android build on a different computer, I committed and reinstall the plugins but I somehow feel it had to be related because this page should leave the application
Not sure if I mention this but this is the same thing it does on Android when ran with love reload.
I haven’t stopped trying things, kind of have to figure this out before google+ stops working entirely for logins.
I reinstalled all the plugins from this page: https://firebase.google.com/docs/auth/web/cordova
I have also confirmed that if i run it with ionic serve that i can login with google no problem, the return urls work, the popup works, comes back and logs me in. I also confirmed it still all works on my windows PC and my multiple Android devices.
So the question has to be, what could be missing that it would work in safari on the mac, but when i build it and push it to my phone it always reverts back to the 403.
I have confirmed the correct function to use is the redirect login method for both android and ios as far as i can tell. The popup method for browser versions.
What could i possibly be missing? are there any libraries or plugins or anything that could make it this way.
I can’t really give up on this because our app is already live using google+ logins, so we need to replace with the firebase method of google signin.
Thanks for your help so far. I still think the problem is the google signin shouldn’t be happening inside the app, it should be loading a chrome or safari windows and it seems to do that on Android no problem.
Because as you can see here on my android screen shot, I am completely outside the app, theirs no more blue status bar like i do on my ios device.
No other ideas MattE? client is starting to lose his patience with me i’ve been trying to make this simple thing work for days now.