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
Related
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.
I'm writing an app that requires a user sign in with Google on Android and then proceeds to get data from the server (a Google App Engine instance, in this case). How could I go about making sure that the user is actually logged in instead of just calling with a user ID? Is there a way for google to check a secure token they provide on Android for authenticity? Or is there another non-google related way to do this?
Thank you for the help!
Okay, so this is actually a very simple task. You ask Google Play Services for its OAuth Token and send that. Then the server asks Google about that token and Google will give it all of the information in the scope at once using one of their multiple limitless OAuth APIs.
Is there a way I can use Google credentials to get basic user info like
Email, Name, Gender
and use them in my application? Its like allowing user to login into my application using Gmail.
I asked the same here.
But the answer says:
You should not use Gmail for user authentication using Google
accounts. You can use Google + Sign-in for Android instead. This will
allow you to access the user's profile information upon getting the
required permissions using OAuth. Check out the guide here:
which i followed and everything worked fine.
But if a Gmail account has no GooglePlus profile, My application asks to create a GooglePlus account. Which makes me think I implemented a GooglePlus Login instead of Gmail Login.
Is the answer for my other question right? Meaning without a GooglePlus profile you cannot have a Gmail Login in Android?
If not how can I have a Google Login in my application?
A similar question here, with no replies.
Please help. Thank You
Try article on this Url : http://nilvec.com/implementing-smtp-or-imap-xoauth-authentication-in-java.html.
I think this will help you
I wouldn't confuse a "gmail" account and a "Google+" account as being different things. Really what you want is for a user to authenticate with their "Google account", which spans many services.
On Android, the easiest way to build authentication with Google accounts is to use the Google Play Services SDK, which includes services like Google sign in.
Google+ documents an end-to-end approach to using Google Play Services SDKs that cover the issues that you asked about by using the PlusClient:
Setting up the client
Getting the user's email address using either PlusClient.getAccountName() or the REST methods.
Getting the user's profile info using the PlusClient.loadPerson()
Documentation for using Google's OAuth2 to authenticate a user are provided at https://developers.google.com/accounts/docs/OAuth2Login. As the page notes, however, you and your users get additional features if they use a Google+ account and the Google+ Sign-in, but this is not necessary.
The scopes required are
https://www.googleapis.com/auth/userinfo.profile for name and gender
https://www.googleapis.com/auth/userinfo.email for the user's email address
Update: I should amend that these scopes are now deprecated, and scheduled for removal. See the URL above for details.
I'd like to use SSO (Single Sign-On) for users of my app, but I don't understand how to apply it to my case.
To summarize, we have:
a database
a website
an iPhone app / an Android App
Currently, it's possible to create an account on the site, and then use the same credentials to connect from the mobile apps. All communications between mobile apps and server work through http requests.
To put it simply, I would firstly
be able to use Google accounts to authenticate users
offering Android users to choose one of Google accounts associated with their smartphone
I found several sources of information:
Google - Using OAuth 2.0 for Login
Android - Remembering Users
Unlike what I saw in some examples, I don't need to make request to Google services like Google Calendar or Tasks, I just want to authenticate the user.
Does someone could tell me what I need to do on the website and on the mobile app. Should I store information in my database? How to ensure that after authentication, all http requests from the mobile application are really from authenticated user?
Do not hesitate to ask me to clarify some points.
Thanks in advance
As OAuth is a standard for authorization and not for authentication, it doesn't support any direct method for this. However, most providers allow you to call an endpoint that returns the id of the logged in user. Google returns the id as part of the basic profile information. This step is described in the first article you already mentioned. There are multiple libraries available to simplify this step for you.
So for identifying a user you acquire his Google user id and store/match it in your database.
To get the user's id on an Android device, there's an even more simple way. Just use Google Play Services as described in its documentation. You can find the user id in the response to the call in the last section of the documentation.
Now there's still the problem that you have to send the user id from the device to your web server and verify that this call was issued by your app. Fortunately, Google has also built a method into Google Play Services for exactly this scenario. There's a blog post by Tim Bray at the Android Developers Blog about this.
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.