You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 7, 2018. It is now read-only.
wkwebview works great! Huge performance improvement on iOS compared to the UIWebView.
I'm using firebase inside my app and social login to log the users in with their gmail account.
I followed this guide https://firebase.google.com/docs/auth/web/cordova to implement it and it worked fine with the UIWebView. It uses the sign in with redirect method that opens a webview inside our ionic app and handles the OAuth flow.
But with the wkwebview it's not working anymore firebase is giving disallowed_useragent error.
Is there a way to fix this? Will spoofing the user agent before making the request make it work?
The text was updated successfully, but these errors were encountered:
This doesn't look like a problem with the wkwebview-plugin. Google is specifically blocking your method. I wouldn't recommend spoofing your User-Agent even if you can for security and compatibility reasons. What you should be doing is redirecting to the native browser (not using an embedded webview) when the user is authenticating and use a Custom URL Scheme to redirect back into the app once the user is authenticated. It looks like that is what the Firebase documentation is suggesting, so you should follow their instructions.
For social login with google, regardless of using Firebase or any other method, and regardless of using webview or wkwebview, you need to use the safari view controller or chrome custom tabs plugins. Follow the plugin instructions in this tutorial: https://firebase.google.com/docs/auth/web/cordova
Unfortunately I also encountered problems with social login, even after following the above mentioned tutorial. The social login page gets opened in the system browser, but is then redirected to localhost instead of the app deep-link (to be opened in the app itself).
Has anyone got the Firebase social login working with this? Thanks!
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
wkwebview works great! Huge performance improvement on iOS compared to the UIWebView.
I'm using firebase inside my app and social login to log the users in with their gmail account.
I followed this guide https://firebase.google.com/docs/auth/web/cordova to implement it and it worked fine with the UIWebView. It uses the sign in with redirect method that opens a webview inside our ionic app and handles the OAuth flow.
But with the wkwebview it's not working anymore firebase is giving
disallowed_useragent
error.Is there a way to fix this? Will spoofing the user agent before making the request make it work?
The text was updated successfully, but these errors were encountered: