Menu

How I Fixed Google and Facebook SSO in a Mobile WebView
📰

How I Fixed Google and Facebook SSO in a Mobile WebView

DEV Community: authentication·Eissa Saber·about 2 hours ago
#JDdYgYsd
#devtoauthentication#devto#dev#sign#google
Long article (600 words) — no AI summary yet.
Reading 0:00
15s threshold

Originally published on my blog .

Google and Facebook block sign-in inside WebViews, and our Cordova app had been stuck on it for two years. The fix: sign in in the real browser, then come back to the app through a link.

The problem

The mobile apps I worked on were built with Cordova, so each app is a web page running inside a WebView. Google and Facebook sign-in used to work there, until both providers changed their rules and it stopped working. The bug was two years old, several attempts had failed, and one of our biggest clients made fixing it a condition of renewing.

Why it happens

Sign-in inside the WebView worked fine at first. Then Google and Facebook restricted SSO to the normal browser only, and blocked it inside WebViews. They did it on purpose: the app that hosts a WebView can read everything typed into it, including a password.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.