Using Google Authenticator in a non-google android application - android

I want to use Google Authenticator as one of the security lock in my application. I want to know if there are public APIs available to use Google Authenticator for this purpose. It's a non-google android application which does not need a google account.
Thanks & Regards,

Sure you can. You don't need APIs, the Authenticator is completely open source, and doesn't need to talk to Google servers. There's also a convenient PAM if you're doing straightforward auth. Essentially, you need to get a secret key from the auth module that you enter into the phone app, and you're good to go.
See here for an example of using it to second factor ssh.

Related

Is it possible to use Android Management API without Google Cloud?

I haven't found anywhere in the Google's Android Management API any alternatives to using Google Cloud as its backend.
For users who have hard requirements against using Google Cloud or if it's unavailable in your physical location, does Google provide alternatives?
For context, Apple's take on this is that infrastructure is provided by the user itself and there is no "middle man".
The alternative option that Google provides is the use of Google Play Console. It allows users to use 3rd-party identity service by linking managed Google Play Accounts with the user’s existing identity accounts.
Also, since this is not tied to a user’s existing domain, creating more than one Enterprise for a single organization is possible.
Please refer to this link for additional information regarding this matter.

Alternative for using webview for oAuth Google without Google Play service incorporation

We have custom devices which run on Android OS but dont have Google Play services incorporated.
We have Google login using Webview Oauth2.0 authentication. And as per the documentation it has been deprected.
I read that there is a way https://developers.google.com/identity/sign-in/android/ but this seems that it requires gradle incorporation for play services.
So which way could I use for google authentication?
I found 2 options as below but will they be helpful in my case?
1. https://firebase.google.com/docs/auth/android/start/
2. https://developers.google.com/api-client-library/java/google-api-java-client/oauth2
Which can be the most suitable for my requirement
Please help.
Regards,
Shraddha
Yes, indeed google quite some time ago has blocked the possibility to login to it's services via app's internal WebView. The reason is that Google does not trust external app providers, where it is't aware of security of connection. It forces external app providers to use Google's methods of login to it's services.
Source: Modernizing OAuth interactions in Native Apps for Better Usability and Security
Indeed you have found the right methods to use Google services, however, Firebase and Google Sign In have disadvantage that makes them unusable by you, namely both need Google Play Services. Firebase needs them and Google Sign-in needs them. So there is no official way of using both on devices not having Google Play Services.
There is yet another way: Chrome Custom Tabs. However, they require Chrome installed on the device. And since a long time it also uses Google Play Services. Moreover, Chrome Custom Tabs have been introduced later than Chrome has incorporated Google Play Services
However, there's a hack. Declare app's internal WebView's User Agent as Chrome. Here is the documentation. As seen at the bottom of this page, you could remove following Strings from WebView User Agent String:
Version/_X.X_ on Kitkat Devices
wv on Lollipop+ devices.
However, I do not recommend this method and kindly encourage to stick to Google Policy, if there is a possibility.
Hope that this explanation is enough.
EDIT:
As per comment below, Goole Api Java Client does not need Google Play Services, so this might be an option.

Google Authenticator my Android app

I am making an Android app, but I want to use the functionality of the Google Authenticator app in my app, in a way that the users won't have to start the Google Authenticator app to get the login. I want to kind of integrate it. Is this possible? Is this feasible? I did find the Google Authenticator Source, but I have no idea where to start. So if it is possible and feasible, where do I start?
No, it no possible use Google Authenticator for own purposes.

Register/Login user using their Google Account?

I want my users to login with their Google accounts.
SwiftKey and Catch Notes do it by opening a WebView in their apps. I don't want to do that. I want to use AccountManager.
Tasks Free from Team Tasks uses it and loads your Google tasks easily. The official Google Reader app also uses it and loads your Google Reader feeds.
But I don't want to get any data of the user from Google except their name, email, etc. I only want to register the user and log them back in easily.
How do I register them with OAuth tokens etc?
All the examples I have found either use WebView or only load data from Google (not register).
When I first asked this question, it was really really hard to do. You had to use the Google Java API definitely not built for Android.
But there is now Google Play Services and this task is very easy to do.
Anyone can follow the below links:
https://developers.google.com/+/mobile/android/sign-in
https://developer.android.com/google/play-services/index.html
Google I/O 2011 covered Android + App Engine, which uses Google accounts for authentication. The Android client uses AccountManager. Here's the screenshot.
You may want to look at AccountsActivity in the source code.

API to access Google Profile on Android

Google accounts come with a pretty nice profile already, and since all Android phones connect to that profile for most of the google services. I'd like to add an option to my application to simply register with my application using your google profile on the phone. Not only would I have access to information like email address, name, aliases, but also profile images people use on google services.
Which Google API provides me access to that? Is there something in the Android API's that already provides this that I'm missing? I'm not just looking for authentication, as with OAUTH, but access to the profile information as well.
Are there any existing libraries I can use?
Turns out there is a way to get access to the google profile(s) the user has:
http://code.google.com/p/google-api-java-client/wiki/AndroidAccountManager
That's awesome.

Categories

Resources