How do I resolve google login in ionic 5? - google-signin

I am using google plus login in ionic app. I have already registered my app in google console and generated my client id. But when I am building android apk and after installing it in my mobile phone, popup comes for selecting email id but after clicking on it the popup closes and nothing happens.
Here is my code.
> this.googlePlus.login({
> 'webClientId':'9*********************.apps.googleusercontent.com',
> 'offline': true }).then((res) => { console.log(res); alert(res.email); });
I didn't get any working solutions from my search. Please help me to solve this issue.
Thanks in advance.

Related

Firebase dynamics link params

I working with Firbase dynamicLinks in my App and I have link that open my app.
I want to add dynamic parameter that change everytime for example -
My link:
https://mydomain.co.il/stepB? (working)
https://mydomain.co.il/stepB?userid=1212 (userid supposed to be change per relevant userid)
I trying just to add ?userid=1212 in this is working on IOS but in Android this is not working.
Please help.

HandleCodeInApp false not redirecting to web browser when generating password reset link Firebase

I am trying to generate a reset password link with the Firebase Admin SDK in a Cloud Function.
This works great.
However, if i click on the link (inside my mailbox) from a smartphone, it opens back my application and not my website.
I was hoping than setting handleCodeInApp: false would open the link in the browser but it doesn't. I have tried to set it to true to see if there would be a difference but no unfortunately...
I have not tried with other methods than admin.auth().generatePasswordResetLink() but maybe it will also happen.
Here is my ActionCodeSettings object :
const codeSettings = {
url: "https://www.example.com/handler/_resetPassword",
iOSBundleId: "com.mypackage",
handleCodeInApp: false,
androidPackageName: 'com.mypackage'
}
I have done the setup of Firebase Dynamic Links as well.
How can i make the link to open the browser instead of the mobile app ?
Note : I have made an issue in the Flutter repo as there seem to be many about the whole process. However, my question is not about Flutter, only Cloud function that seems to not be working for this use case.
EDIT :
It seems (according to Firebase Support) that there is no bug in the native SDKs :
We still have not been able to replicate this issue with the official IOS SDK, I have followed all the steps mentioned here , but no luck.
The here link.
So I will have to make more tests to see why this bool value is not working.
Hopefully in the meantime, someone with a solution will post it here !

Firebase Dynamic Links do not survive app install on iOS 11.3.1

Firebase Dynamic Links do not survive on iOS 11.3.1 when user don't have installed. Anyone else experiencing this issue? This works fine prior to iOS 11.3.1
Repro steps::
Click on FDL link
User redirected to app store
User install app
User open app
FDL params not passed
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
//the url here returns:
//google/link/?match_type=none&match_message=No pre-install link matched for this device.
or
//google/link/?dismiss=1&is_weak_match=1
}
I've reported this to Firebase and they're still working on the fix.
https://github.com/firebase/firebase-ios-sdk/issues/1244
In the meantime, the workaround is to turn off the forcedRedirectEnabled.
FIRDynamicLinkNavigationInfoParameters *navigationParams = [FIRDynamicLinkNavigationInfoParameters parameters];
navigationParams.forcedRedirectEnabled = NO;
components.navigationInfoParameters = navigationParams;
or if you use the admin console to generate the link, you need to leave the Skip the app preview page setting unchecked.
Note that this means users will see one interstitial page before it redirect to app store, which is not ideal but at least FDL params will be passed.
Hope this helps someone.
Cheers!
I had the same issue.
And I found that when I delete FirebaseDeepLinkPasteboardRetrievalEnabled in Info.plist the problem is resolved
https://firebase.google.com/docs/dynamic-links/ios/receive
Optional: Disable the Dynamic Links SDK's use of the iOS pasteboard.
By default, the Dynamic Links SDK uses the pasteboard to improve the
reliablity of post-install deep links. By using the pasteboard,
Dynamic Links can make sure that when a user opens a Dynamic Link but
needs to install your app first, the user can go immediately to the
original linked content when opening the app for the first time after
installation.
The downside of this is that use of the pasteboard triggers a
notification on iOS 14 and later. So, the first time users open your
app, if the pasteboard contains a URL, they will see a notification
that your app accessed the pasteboard, which can cause confusion.
To disable this behavior, edit your Xcode project's Info.plist file
and set the FirebaseDeepLinkPasteboardRetrievalEnabled key to NO.

Dynamic links in Facebook mobile app is not deep linked to app

Problem — when opening a Firebase Dynamic Link on Facebook Mobile, the Facebook Browser consumes the deep link and does not open the intended mobile app
Question — is there a good workaround in Firebase to help Facebook deliver on the promise of presenting my Dynamic Link as intended?
We are aware of http://applinks.org, and that Facebook is a contributor. Does Firebase have a way to configure their server using the AppLinks spec so that Facebook will pass through the Deep Link to our app instead of consuming it?
Background — I have created a Firebase Dynamic Link for an iOS and Android app.
The Dynamic link delivers everything I expect and is a fantastic experience.
When opened on iOS, it navigates to the App. If not installed, it goes
App Store
When opened on Android, it navigates to the App. If not installed, goes to Play Store
When opened on non-mobile, it navigates to our Website
On Facebook mobile, neither 1 nor 2 happens. The result is that it goes straight to the mobile web experience, thereby eliminating the promise of the Firebase Dynamic Link
To avoid this cases we made a webpage which redirects to firebase dynamic link.
With this solution we can:
Use our domain, not the firebase url.
Ensure that firebase links works in every cases, for example when it opens from a custom browser (fb, samsung).
The disadvantage of doing this is that you'll always need to pass through a web page with an redirect.
I recently had to integrate dynamic links to one of my clients apps, and I got lots of trouble because of deeplinks not working on facebook+android_app.
As I couldn't move to branch.io because of princing reasons, I had to work it out on a different way so followed #Rahul Shukla advise.
I ended with a very simple nodejs+express setup where I receive the dynamic link ID and return a HTML with all the meta-tags required by facebook applinks (android + iOS) and a redirect script (window.location = 'your_dynamic_link') for other clients to be used.
The best part is that now on facebook the app opens directly without the preview page in both platforms and the link works on all browsers via the script redirect.
Here is the gist
the solution I found was to redirect to the dynamic link from a webpage like this
window.location.href = "intent:https://example.page.link/2wertygf456#Intent;end";
this will open the link in your system default external browser and the deeplinks works perfectly.
to trigger this only on facebook in-app browser
if (ua.indexOf("FBAN") != -1 || ua.indexOf("FBAV") != -1) {window.location.href = "intent:https://example.page.link/2wertygf456#Intent;end";}
We were struggling with the similar issue and here's how we finally solved it:
Say this is the final firebase url you are going to share
https://xxxx.app.goo.gl/?apn=com.your.package&link=http://www.yourwebsite.com
Now in the index.html page of your website, add the following meta tags
<meta property="fb:app_id" content="your_fb_app_id" />
<meta property="al:android:package" content="com.your.package" />
<meta property="al:android:app_name" content="YourAwesomeApp" />
<meta property="al:android:url" content="somescheme://XYZ" /> <!-- identifiable by your app, your app must handle this data scheme inside your manifest's intent-filter tag --!>
<meta property="al:web:should_fallback" content="true" />
<meta property="al:web:url" content="http://www.yourwebsite.com/" />
Now the app launches on clicking on the facebook post shared using this link.
I've tried some ways but totally fail. When I use the dynamic link in Facebook post, it shows a dialog to ask me if I wanna open application (I did not install my application yet). Although I accept to open app, nothing happens, it does not open Apple Store as expected
I have to use link like below to force it open apple store app
https://myapp.app.goo.gl/?link=http://mylink.com&ifl=https://itunes.apple.com/us/app/apple-store/idxxxxxxxx%3Fmt%3D8%26ct%3Dutm_source
Deep link with facebook app not work in android because facebook uses InAppBrowser, If you want to make your deep link url workable in facebook. You can change facebook settings like:
In Facebook App: Goto Profile -> App Setting -> check Links open externally.
After changing the setting you will be open deeplinks from facebook app android

Chat (like Facebook) source code/component for ASP.NET Website

I want to add a chat feature (like Facebook chat) on my ASP.NET Project. All chat functions are like FB Chat. Example:
blink browser 's title to alert user when new message come
do not close when reload page
...
My project have users database and user will login to use chat feature.
Hope someone tell me source code or component or any information about that.
Thanks !
Found this one: JabbR. Live site here, Source code here. Try out the Live site and if you like it, download the source from github.

Resources