Integrating spring social with native android app

103 Views Asked by At

I am developing an android app with Facebook, Twitter logins and custom posts with these providers. But their callback sequence causes instability in my app. I want to transfer login job. I am curious about how can I integrate spring social to my native android app. Is there any tutorial for that? I am also using firebase. Actually all user management done by Firebase authentication. But as I mention, custom logins interrpt my child fragment flow in the app. With all these technologies, I cant decide a good application structure. I am open to any suggestion. Thank you already.

1

There are 1 best solutions below

0
Dmytro Ivanov On

First of all you should understand how can you work with third-party API (Google, Facebook, Twitter). Each of them implement OAuth2 flow.

Simple case:

  1. User inside app click social button with facebook.
  2. Then he should clicked allow button. (Better use SDK Android/IOS, because if user has facebook/twitter app it will appear for confirmation)
  3. SDK will fire your callback with payload such as user-id, token and etc. (In case of own WebView your should handle by yourself)
  4. Now you can do whatever (call some social api for fetching user data, send request to your backend for auth/register, or maybe firebase request)