[Facebook Connector] Is it possible to reuse iOS  and Android Facebook app credentials?

[Facebook Connector] Is it possible to reuse iOS  and Android Facebook app credentials?

  
Forge Component
(5)
Published on 26 Sep (4 days ago) by OutSystems
5 votes
Published on 26 Sep (4 days ago) by OutSystems
Hi,

Is it possible not to ask user to reenter his credentials to Facebook accounts if he is already has them set up on systems settings? 

Thank you.

Best regards,
Nick
Hey, Mykola,

How so? Do you mean you're getting too many requests to login from the connector (even though you just logged in a couple of minutes ago)? Or is this related to something like a persistent login (aka saving the access token and recalling it on session re-start)?

Best regards,

Carlos Simões
Hi Carlos,

I mean if user is already entered his credentials on a phone it makes sense to use them instead of asking him to enter his email and password again when he is logging in / signing up  with our application that uses Facebook connector.

Best regards,
Nick
Hmm, I see what you mean.

Well, if you're using OutSystems Now, it's expected that users would have to login again: I'm almost 100% sure that the underlying web view doesn't share the cookies from the standalone Chrome/Safari browser, so it has no way of knowing if the user has logged in.

If you are using the device's browser, however, that's a different story. I recently tested logging in on the Demo screen of the connector, with my Facebook account logged in, and it only asked for permission to access said user's data. Even subsquent logout/login attempts didn't ask for a username and password.

Did you refer to the first scenario? If so, then I think we might need to open the login dialog in an external browser, giving it an url that would open the app giving it the access token (if that makes sense; since I am hypothesizing here). To do so, you would need to customize OutSystems Now to allow this type URI.

Another alternative would be to have the redirect url be a server endpoint, which would receive the token and store it server side, instructing the user to manually open the app afterwards, which would then fetch the needed credentials.

Does this make sense?
Hi Carlos,

Yes our case is the first scenario. We will try your suggestion with opening dialog in external browser and then redirecting back to app with deeplink. Thank you. 

Best regards,
Nick
Solution
I know you wanted something a bit more sophisticated, but that's the currently best supported scenario by the connector.

We're currently investigating better native implementations to support service login (we've first looked into InAppBrowser plugin based implementations, but I'm guessing we'd be better suited with a plugin which actually uses system credentials) that better fit the vision for P10.

I don't think it'll arrive in time for your needs, but I thought I'd let you know we're definitely considering native-friendly components for P10.

PS: If you want, you could also download OutSystems Now, follow these instructions and try and add the plugin I just mentioned to your shell. I haven't tested it, but if it really improves your experience and you're up for some experimenting, I'd say it's worth a shot.
Solution