Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with social logins #14

Open
latinvm opened this issue Aug 13, 2019 · 7 comments
Open

Problem with social logins #14

latinvm opened this issue Aug 13, 2019 · 7 comments

Comments

@latinvm
Copy link

latinvm commented Aug 13, 2019

We have a PWA that uses social logins. This used to work perfectly, but now I see that the users aren't being redirected to the right webview. This seems to be caused by registered app domains (like facebook) that hi-jack the request and open their own app.

Our approach would be to also register app domains to make sure the request get's redirected to app (webview) instead of to a new browser on the mobile device after the native app has verified the oauth request. We would just need a way for the app to handle "incoming" requests.

My question is: does this sound like the right approach?

@xtools-at
Copy link
Owner

xtools-at commented Aug 13, 2019

I recently looked into a similar issue with the iOS wrapper.
My approach would rather be "whitelisting" social login urls/domains , so they don't open in a new window in the first place like any other external link, and handling oauth directly in the wrapper webview. Otherwise imo, the user would log in in their normal browser, which doesn't share its cookies with the wrapper, and even if you direct him back to the app somehow, s/he wouldn't be logged in there.

@latinvm
Copy link
Author

latinvm commented Aug 13, 2019

I extended the code with some whitelisted "social domains", this worked fine before. But now it stopped working, I guess I will need to experiment with this and add some "handler" for incoming URL's.

Even if it keeps the social domain inside the webview it opens the app that corresponds with the social domain. e.g. m.facebook.com -> Facebook app.

@xtools-at
Copy link
Owner

I guess you could try adding intent filters for those domains to the manifest, but that's not a real solution either (user is prompted which app to use, but if s/he selects "always open with", it will again always go to that app)

Will try and make up my mind, please let me know if you find a solution.

@latinvm
Copy link
Author

latinvm commented Aug 13, 2019

I'll let you know if I find a solution and share my findings!

@tariva
Copy link

tariva commented Sep 27, 2019

Any updates on this ?

@latinvm
Copy link
Author

latinvm commented Sep 27, 2019

Unfortunately not, we have disabled social logins for now.

@fider
Copy link

fider commented Oct 3, 2019

Is Google Sing-in also kind of social login that is not working?
I am considering using firebaseui for authentication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants