We have our own Ember to Api login working, using ember-simple-auth, and jwt. In addition, we also want to connect to Facebook and additional third party social networks.
We are able to connect and auth to facebook using ember-simple-auth and a torii provider.
2 problems.
1) If the facebook (or other third party auth) popup is closed or canceled, the session is invalidated and the user is logged out. 2) if the user connects to a fb account that is already associated with a email used by another user (think social media company page), the session is invalidated and the user is logged out.
Both of these behaviors is fine if the user was logging into your application, but in this case I would like to catch the error (which I can do, some what), report that, and continue the original session.
Any suggestion how to do that?
using : Ember: 2.11.3 ; Ember Simple Auth: 1.2.2 and torii : 0.8.2
If you're not using Facebook as part of your app login auth I would probably look at creating a separate service to handle the facebook auth interactions. It sounds like the issue is probably due to the ember-simple-auth authenticator invalidating your session on the reject response and causing a conflict.
Something like https://github.com/pitchtarget/ember-cli-facebook-js-sdk would allow you to setup a service that interacts directly with the Facebook auth without affecting your app login state.