I've read the documentation about the integration of Facebook and Google sign in and I want to integrate both the methods in my app. I want user to sign up using either of the provider and once account created, can login through the same provider like usual other apps. I'm unable to find out the approach to do so and also I'm a newbie to the android development. I've implemented Google sign in already.
Any help would be appreciated.
Related
I have seen many post about firebase with google sign-in. In google's tutorial for google sign-in for android project, it does not use firebase but on many post people use firebase with google sign-in. What is the advantage of using firebase and when and why we need to use it?
Authenticate users by integrating with federated identity providers. The Firebase Authentication SDK provides methods that allow users to sign in with their Google, Facebook, Twitter, and GitHub accounts.
With Firebase the users will be authenticated and you will have access to the firebase database/cloud functions and other services. So its better to use firebase with google sign in. Basically to make it easier for you after sign in.
Top two reasons for using Firebase:
You want your users to have option to login with any social media platform but do not want separate dashboards since its hard to get proper analytics.
Firebase has introduced something amazing called cloud functions which will allow to have your server side script to be hosted on Firebase. You would generally want the token given to you through authentication to be stored in your server and database. Firebase is now providing both so having everything in the same place does help. I basically brought down the release time for a decently complicated app from 14 days to 6 days using a combination of these two.
Is it possible to integrate both facebook and google in one app so as to in allow user to sign in for both ... i.e use google game services for Real time multiplayer and then at the end, post the result on facebook .. so in a manner where my app would hold both sessions fb as well as google ?? is thing this possible ???
yes of course , you can use the google+ API and the facebook sdk in your API.
you begin by Login your users by googles+.
in the end, if the user wants to share anything in facebook you authenticate him with facebook sdk, then ask for permissions then publish what you want.
you can find many tutorials and samples about the authentication in google+ and facebook.
I don't want to give advertisements about libraries (and I didn't even test anyone of them...) , I hear about GigyaSDK. they have a good documentation of integration.
I d like to use an Oauth authentification on my android application with a google account so that the user doesn't need to create a new login and password and that I don't have to handle the authentification but google does it in my place. I've been searching for a while but couldn't found informations on how to do this with a google account on an android app. Does anyone know about that ?
There's no need to use a special OAuth Library like signpost. Android has an AccountManager with Google OAuth support built in.
See this answer for a minimalistic example on how to use it. Google's account type is com.google.
Google has also has a step-by-step guide on how to implement this using the access_token then to call the Google Tasks API.
I'm creating an app that will need users to create an account. (Like Facebook or Twitter would require you to.)
BUT, since it's an Android app, should/can I let them sign in with their Google Account using AccountManager or some other service? It'd be very helpful if they could just sign in to their Google account and their settings and other options would be saved to that account.
Main questions summed up:
Is it possible to let a user just use their Google account in my app?
If so, do I use AccountManager to have them sign in and save account information/settings?
What are other options?
Yes, you can get users to log into their Google Services using their Google credentials, for example, I have an app on Google Tasks and I use the Android AccountManager to let users authenticate themselves using their Google account on the android device (No need for users to enter their password!)
There are some really good examples to get you started:
This is an in-depth look into how you can authenticate based on the users Android credentials, has an example of how things work and how the UI should be: http://www.finalconcept.com.au/article/view/android-account-manager-step-by-step-2
This is an example of getting AccountManager to work with a Google service like Google Tasks: https://developers.google.com/google-apps/tasks/oauth-and-tasks-on-android
The last example is using the same concept for accessing the Google Picasa service: http://code.google.com/p/google-api-java-client/wiki/AndroidAccountManager
The other options you have is to have users manually enter their username/password. For that you have to use a third party authentication API (like signpost for OAuth) for them to log in.
In my tasks/todo application I provide users both options to sign in, using their android credentials or using third party authentication for users that want to log in using some other account (an account which is not enabled on that device)
Let me know if you have more questions
Although it is a new development, Google Plus Sign-in introduced as part of Google Play Services can also be used. More info can be found at Android developers blog. See example implementation from Banjo app
There seems to be a big limitation - The user need to have Google+ app installed on the device to use this.
Also this is a pretty good blog if someone is interested in implementing the solution.
#Soham gave you some very useful links but he didn't correct one major error: AccountManager is the entity that manages the accounts on your Android device - it has nothing to do with your google account! you can use google account and create a NEW account on your device using the AccountManager.
The rest you can learn from the links Soham gave you.
I have been building an application on android and wanted to do some user authentication using twitter oAuth. But is there any service by google which will allow user authentication easily? Could you please let me know if any other services exist for android ?
Regards,
Lalith
I haven't tried it but I believe you can use openid authentication which accepts google login too. Details about openid with google is here:
http://code.google.com/apis/accounts/docs/OpenID.html