Closed aidar87 closed 2 years ago
@aidar87 login is limited by the redirect approach. You shouldn't get any error by fetching js. Maybe you need to add google domains to info.plist. What exactly error do you get?
Tried to add accounts.google.com to in app bounded domain to Info.plist, to authOrigins in Settings.swift but it didn' help. Here are screenshots from pwa-wrap with errors:
And here is screenshot where it works on iOS safari:
Try to debug this function and see what happens with this request.
webView function was not called on this request.
Do you use HTTPS? Have you tried this on a real device? How do you plug in this gsi?
Sure, https, the referer header in screenshots are the same. I tried on real iphone XR ios 15.3.1 - from safari script is loaded successfully, from pwa app which is published to App Store get 403 error. I tried to add script tag in html, appending using js both got 403 from google server.
Can I replace user-agent in pwa-wrapper webview? Asking because safari user-agent differs from webview's
Can I replace user-agent in pwa-wrapper webview? Asking because safari user-agent differs from webview's
Yeah of course https://github.com/khmyznikov/ios-pwa-wrap/blob/f01a2600ba62b093187f1507a8ee2533fe4afbfe/pwa-shell/WebView.swift#L51
Thank you very much, with custom UserAgent it works!
Thank you very much, with custom UserAgent it works!
Do you used this string? Or added something extra?
Yes, I did. I am using your previous project before you added this feature with custom user agent
@aidar87 Could you tell for more details on what did you do for google social login. I have the issue when you choose the user and then I stuck on the consent screen and that's all. I used debug for check - but all is ok. Errors are absent. In the browser all is ok.
@dmytro-podolianskyi-ew I have exactly the same issue, have you found a solution?
Guys, sorry for the late answer. It is working. Here is workaround: I used redirect for Google OAuth, pop up didn't work. Added accounts.google.com to the Info.plist and authOrigins variables in Settings.swift, changed webView.customUserAgent to any different.
@keysen1 @dmytro-podolianskyi-ew did you find any solution for consent screen? I have same issue and @aidar87 solution is not enough. I sign by google, login by google, end up with 400 on consent https://accounts.google.com/signin/oauth/consent?... When I try login by google again, there is already session and it works
Hi, thanks, I like your pwa wrapper, I added sign in with Google account, in Safari all is ok, but in wrapper I got 403 error when fetching js script https://accounts.google.com/gsi/client. Not sure, maybe app should be added somewhere in google cloud console or install Pod for google or creating separate OAuth sign in credentianl in Google Console