-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Cordova + Angular - Social Login receiving tokens after auth, but not logging in my app #1120
Comments
Another day spent, here's what I've found: InappBrowser seems to be installed correctly as I put a test window open with it opens my test link in a popup. InappBrowser doesnt work for Satellizer as no matter what I do, when I click on the social button it just goes to social login form location and never opens it in a new tab or a popup. Here's my cordova init.js if it helps: document.addEventListener('deviceready', function() {
}, false); |
So, I finally found the issue and its more than one.
@sahat You may want to add this note (2) to the docs for users who's apps are just wrappers for their webapp/sites. Installing the plugin is a must in order for satellizer to work for them out of the box. It will save them a lot of trouble and time. Everything good, but here's the catch - Google dropped the support for webview auth and it still wont work this way - the popup is opened but you see the disallowed_useragent error. Facebook works for now, not sure about the other socials. As a conclusion, I'm looking for a way to manually parse the ?code - bypassing the satellizer popup function so I can just pass it to my backend and get a token which satellizer will hande. Any ideas on that? |
Hello all!
I've been struggling for the past week about the integration of Satellizer with Cordova and I've barely made any progress.
In general my cordova app is just a webview, so I get all the code from my webapp, where the social login buttons are connected to Satellizer and everything works fine. However when I click the buttons from the app I'm sent to the facebook or google auth page where I log my details, then I'm redirected back to my app, but I'm not authenticated. In the url I receive the tokens, but obviously the frontend client cannot do its magic to authenticate me within my app.
If I do the same from Chrome everything works fine.
Here is my provider setup for Satellizer buttons, version 0.14.1 :
$authProvider.facebook({ clientId: 'xxxxxxxxxxxxxxxx', url: configProvider.data.api.url + '/auth/facebook' });
Inappbrowser seems not to open a popup, however..
Any help would be greatly appriciated!
Thank you!
The text was updated successfully, but these errors were encountered: