Access Google credentials from Cordova - android

What I want to do is log my users in via Google in my mobile app powered by Phonegap on Android.
To do so I use firebase SimpleLogin module which logs me in correctly thanks to the "InAppBrowser" plugin.
My problem is that the webview powered by the InAppBrowser does not have access to my Google credentials. I have to tap them manually each time.
Is there a way to tell the webview how to automatically get my Google credentials from my phone so that I don't have to write them each time ?
Thanks

Probably not. If you're only using the browser for auth, consider using Google+ Sign-in for Android instead.
The browser on Android, like web browsers in general, runs in a sandbox. This means it does not have access to system resources such as Android's AccountManager. This is done on purpose for security reasons.

Related

Android/iOS: How to use existing microsoft account when using MSAL

When using MSAL library for authentication the app is redirecting the user to a webpage where they have to login with microsoft account. If the user already having Outlook or some other app installed then is there a way to get that login info like how FB app does it?
MSAL works best on iOS if the user has installed and configured the Microsoft Authenticator app. MSAL will launch that app instead of a web browser and the user can just tap their account to login.
If the device is managed by an MDM then you can [enable the enterprise SSO component>(https://github.com/AzureAD/microsoft-authentication-library-for-objc#microsoft-enterprise-sso-plug-in-for-apple-devices) to further simplify the login process.
Without the Authenticator app there is no way for your app to get any existing account authentication details.
Just a thought, but:
Azure AD messages are mostly standards based so you don't have to use MSAL libraries
You may get a better mobile solution with AppAuth libraries
Rather than a web page you could use the in app browser solutions, which feel integrated and have some good UX features:
Chrome Custom Tabs on Android
ASWebAuthenticationSession on iOS
In case any of this is useful, here are some links of mine, including code samples you can run:
Kotlin app for Android
SwiftUI app for iOS

Is it possible to do social authentication from the server side on mobile seamlessly?

I'm creating a mobile game using Godot for IOS and Android, firebase and facebook plugins are available for the android version only. Therefore it's not an option because I want to a cross platform solution.
I have a websockets server, I could use that to do the authentication (as a client to call facebook API). My only question is that would the user experience / process be the same? I think not, The user would have to sign in from the browser correct? He won't be able to just use the gmail installed on his phone or facebook, is that true?

AirWatch SDK for Cordova Mobile App - Active Directory and App Tunelling

Our company is building an internal mobile app for corporate mobile devices. AirWatch is used as an MDM solution.
App would have to access data from internal servers (by calling Web.API services). Additionally, each user will have to use their AD (Active Directory) accounts to login to the app (verified against internal AD records). I envision this can be done through Web.API service as well?
I've researched that for existing applications AirWatch provides "App Wrapping" (link), which supposedly takes care of Authentication & App Tunneling (granting access and routing your Mobile App to internal corporate servers using AirWatch VPN).
However I don't have any info on how to implement this. Has anyone done anything similar? Any advice would be appreciated.
I've never done it before but according to the AirWatch documentation:
You can apply available AirWatch SDK and App Wrapping features to your internal applications to integrate your applications and add extra functionality.
Then, just have to implement your app, with or without the SDK but I advise you to integrate it, and upload it on the AirWatch Console. There, you can a procedure to enable App Wrapping and configure options.
Contact your AirWatch administrator to access App Wrapping Guide, Mobile Application Management Guide, AirWatch Software Develpment Kit for Android.

Access CloudKit from Android?

Is it possible to use CloudKit Web Service from Android native app? How will that authentication popup window appear in a native app if I want to let user able to modify records?
Can I put a button to the native app, that will open up browser and the redirected content will appear there, and when authentication successfull, specify a callback where token which uniquely identifies users, I guess user record name can be received?
Apple engineer talks about login from web here on this session video: https://developer.apple.com/videos/wwdc/2015/?id=704
CloudKit Web Services is intended "to provide a web interface for users". If you use it to provide a native Android interface, you will probably get your iOS app rejected and lose your CloudKit access entirely.
But if you want to try it, Apple already has documentation for CloudKit Web Services which explains how to authenticate users.
From looking at the session video you mention, and also at the links and comments from Richard, I would say the answer is No to writing full native Android CloudKit apps. The reason is that Apple does not give you the option to enter the userID and password in your own dialog. The user can enter those only in a web window popped up by the apple code. So it seems at least that part of the app (authenticating the user) needs to be done using web code. I am not an Android programmer so perhaps it is possible to put together a hybrid app that addresses this issue.
Having said that, public database access does not require an iCloud account so you may be able to write an app that only uses access to the public part of your container using native Android code.
I am no expert but this is what I read on Apple website.
Use an API Token from a website or an embedded web view in a native app, or when you need to authenticate the user.
Maybe its like Netflix. Because Netflix iOS app looks just like netflix.com. To me it looks like netflix is using embedded web view. Maybe you can do the same with CloudKit.

Google authentication accessing api through custom service?

I have a web based service (running for years) that works with google apis.
Now I would like to create an android and iphone ui (using xamarin) that uses my web services which in turn talks to google apis.
Given that I don't talk directly to google apis from the phone, do I need to use a web browser control to let the user login, or can I authenticate my server and establish a session natively on the phone?
I'm afraid I need to use a browser window, and I don't think it's user friendly to have to login to a google account in a browser window on the phone.
(I want to keep the logic on the server, so that the phone apps and the web ui uses the exact same code for it's calculations.)
EDIT: It seems Cross-client identity is what I'm looking for.
It can be done natively. See this video https://www.youtube.com/watch?v=9wAx39s10yw which explains all of the procedure using cross-platform authentication.

Categories

Resources