I used Ionic Google Plus plugin to develop this.
https://ionicframework.com/docs/native/google-plus
However I could not find a way to get the Google Accounts Chooser like in Android.
In other native apps that feature is there.
But when used with Cordova Google Plus Plugin it just loads a SafariViewController with the Google Login screen. I tried trySilentLogin() function as well. But it just saves the login state after the first login. I want the user to select a logged in Google Account using the Google Account Chooser without entering passwords.
If it's not possible using Cordova Google Plus plugin what are the other alternatives to implement this?
I found out the problem of why account is not shown in google accounts chooser (at least after upgrading the ios sdk to SFAuthenticationSession, I don't know if it happened from same reason before upgrade):
The google sso authentication accounts are saved in safari data and if you clear safari cache then the accounts are removed. This can be easily reproduced by logging in, in one app (such as yelp, tripadvisor and others) and then you WILL see accounts in other apps on google login. Then clean safari cache and offline data and then you will not see the accounts in other apps on google login. Facebook solved it using custom scheme redirect in a "open in app" button displayed in the SFAuthenticationSession.
When the user logs out, if we call GIDSignIn.sharedInstance()?.signOut(). Next time, then the email selection screen will appear.
It works for us
Related
I'm using google authentication to sign in with firebase.
The authentication process works well and I'm able to create the credentials and authenticate.
My problem is when, after signing out from firebase and google, the user tries to sign in using google again. At this point google will automatically authenticate with the account used previously.
I tried both sign-out and disconnect option from google api but the result is the same.
I partially found what my problem was, here steps to reproduce:
Not signed in with google in app and not signed-in in safari on the device with a google account
Sign in with the application using a google account
Now I am signed-in in app AND in safari as well with the same account
When I sign-out from the application, safari is still authenticated with this user
I'm not able to see the account choice in app until I sign-out the google account from safari on the device
This problem doesn't show up if safari (point 1) was already signed-in with a different google account. In this case I will always have a choice between the two accounts in app.
Is there a way to sign out from the app and always shows the account choice when signing in with google again?
There are many Authentication URI parameters. One of them is "prompt" which could have a "select_account" value. It helped me to resolve the same issue for Auth0-service Google integration. Maybe could be useful for your issue if the SDK allows setting parameters for sign in.
See docs here: https://developers.google.com/identity/protocols/OpenIDConnect#authenticationuriparameters
i'm created a IOS app in Xcode7 using swift , and now i am trying to integrate LinkedIn authentication to login into my iOS app.
So i created a account and application in LinkedIn developer site..
But my requirement is to use the same LinkedIn application account to login into my all iOS apps.is it possible?
i heard about deep linking concept.Any one know more about that?
Is it possible?
Yes it is. In your app preferences, go to Mobile > iOS preferences, then add the bundle ID of each app you want to be linked with LinkedIn.
Deep linking : Any one know more about that?
It allows you to bring users into a more specific part of your app that is not home page. For example, after opening a notification, you can bring user to a specific post into your app. That is an example of using deep links. Nevertheless, I don't think it is what you are searching for.
I am currently trying to get mobile app install attribution from Facebook ads. The goal here is something like this,
Create a Facebook ad that pings Google Analytics of the ad click.
(Example URL : https://click.google-analytics.com/redirect?tid=UA-324109-49&url=https%3A%2F%2Fitunes.apple.com%2Fnl%2Fapp%2Fdrogisterij.net-mobiel%2Fid506652686&aid=com.drogisterijnet.drogisterijnet&idfa=%{idfa})&cs=GAUC&cm=link&cn=Presentation
The ad is clicked and goes to Google Analytics and sends a hit for metrics in the URL params.
After sending the hit the user visits the destination in the App store where I can link the attribute the click of the ad to the installation through the IDFA (since IDFA is captured on install).
There is a Google Developer page that helps create this sort of redirect link here: https://developers.google.com/analytics/devguides/collection/ios/v3/campaigns#url-builder
My issue is I do not know the macro used to get IDFA from the Facebook App .
Is it the same macro as the above link idfa=%{idfa}? I can not find any information on this other than where Facebook says
"The Facebook SDK for iOS only accesses IDFAs in the following scenarios: 1) if your app serves ads within the app through Facebookâs Audience Network, or 2) if your app logs app installs or other mobile App Events in order to attribute those events to your ad campaigns."
Link to above quote.
https://developers.facebook.com/docs/ios/troubleshooting#IDFA
Am I going about this the wrong way or should I just be using a different macro?
In short, you cannot. This is not something supported in Facebook ads.
Right now I'm using a Facebook SDK to share posts from my application. The problem is that this sdk pops up a webview inside my app and asks the user to log in. There has to be a better way.
Can I send the share information to the facebook app on the users device (If they have it installed)? Or at least leverage the facebook app to check credentials? If people have to sign in to share, they probably won't do it..
The latest Facebook SDK 3.5 includes a native share dialog. If you follow the authentication workflow according do the documentation and the phone is on iOS 6.0 you should not get a UIWebView during authentication, instead you will get a UIAlertView.
Facebook login process would use WebView only in a few cases. Some of them are:
1) You are asking it to do so explicitly, by using - (void)openWithBehavior:(FBSessionLoginBehavior)behavior completionHandler:(FBSessionStateHandler)handler; which, I think, is not your case.
2) If there is no Facebook app installed on the device, FB SDK falls back to using WebView login window.
3) Probably, this is your case. If you are requesting publish permissions on the first attempt to open FB session, FB SDK will also fall back to old login flow envolving WebView. In the new login flow, FB session is supposed to be open with read permissions first (in that case, FB will use fast app switching or native iOS FB login):
+ (BOOL)openActiveSessionWithReadPermissions:(NSArray*)readPermissions allowLoginUI:(BOOL)allowLoginUI completionHandler:(FBSessionStateHandler)handler;
Then, you should ask additional publish permissions from the user:
- (void)requestNewPublishPermissions:(NSArray*)writePermissions defaultAudience:(FBSessionDefaultAudience)defaultAudience completionHandler:(FBSessionRequestPermissionResultHandler)handler;
That way, user will not need to log in (if he is logged in FB app already), but there will be inconvenience of double switching from your app to FB (though it works rather fast lately).
I was looking for a cleaner way to get publish permissions with FB Single Sign On on the first call, but unfortunately didn't find anything working yet.
I have followed the example of Facebook SDK for iOS (Hackbook) and it works well however whenever the person is logging in the app takes take the person to Safari or the Facebook app (if you have it installed on the device). Is there a way I can call the permission without leaving the app.
Thanks
there once was. But facebooks says that you should use SSO (single sign on) with the official facebook app. So even if you'd modify the files of the facebook-ios-sdk, it would probably not work.