Google Play Games Stops Working Properly after adding Firebase Unity - firebase

Before adding firebase plugin i used to get the email selection dialog for google play games authenticate and on success i could get the email by using
string email = ((PlayGamesLocalUser) Social.localUser).Email;
But after i have added firebase the dialog doesn't come although it goes in success block after authentication i can only get user id .
Using Play Games Plugin 0.9.3.7.
I need to get user email and make the dialog to show also as before.
Any help ? Thanks

This might be caused because of some issue with conflicting plugins. You should try to resolve this by using Play Services Resolver for Unity - it is available under the Assets menu.

Related

Firebase Dynamic Links: Can't use Google-provided hostname

I can't seem to set up Firebase > Dynamic Links using the Google-provided domain '[my-app-name].page.link'.
I'm trying to use Firebase > Dynamic Links for the first time so that I can use email-address-only authentication in my React Native app. I don't want to pay for a custom domain just to set up a TXT record so that Google can verify the domain, so I'd like to use the Google-provided domain name.
The problem I have with that is when I go to https://console.firebase.google.com/u/0/project/[my-app-id]/durablelinks, click on the 'Get Started' button, select the Google-provided '[my-app-name].page.link', and click 'Continue' I get the error:
This name is unable to be used by anyone. If you believe this is a mistake please reach out to support.
And looking for support led me here.
How can I use '[my-app-name].page.link' as my Dynamic Link so that I can pass dynamicLinkDomain to auth().sendSignInLinkToEmail and get the password-less authentication working?
Thank you!
I can't comment, but it seems that the answer you're looking for is in this question answered by Jeff Avis.
In short: type in anything.page.link and firebase will verify if it's valid or not.
It seems that the problem you're facing is that you've already used the domain you are trying to reuse, and deleted it! that's why it's blocked by firebase for the time being at least.

Flutter - Create sharable profile link

I am trying to create a Social media kind of networking Flutter app in which user can share his profile link. That link must redirect directly to user's profile if app is installed else redirect to link to download app. I am using Firebase as backend. Any resources or packages to work with?
You can use the package Share to enable the user to share their profile themselves. Its really easy to use.
If you would like to share a profile you will need to provide the navigational route to get to the profile screen, then provide the user's ID/data to get/view the desired data.
As far as getting a deep link to get the user to download the app if it is not installed, you can use firebase's dynamic link feature. You can customize what the link preview looks like and says. They have really good docs that you can follow.
You could use a Firebase dynamic link.
A dynamic link is basically a link pointing to possibly 3 resources:
Web URL
Android (Google Play) App ID
iOS (App Store) App ID
So once you configure it on Firebase (it's simple to configure), when the user access the link, Firebase will employ a decision tree to decide where to send the user.
In case the access is done on a mobile device, but if the app is not downloaded, it'll send the user to the store, and after returning from the store, will send the user to the correct path you've configured, following the link.
And on the app, you can implement the SDK to handle this link and when receiving this route request, redirect the user to the right profile they want to access.
I could go through the whole process, but I suggest you check the whole Firebase documentation:
https://firebase.google.com/docs/dynamic-links
In case you have a question on that where I can explain further, just let me know.

PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 12500: , null)

when i create my first project on firebase to use google signin authentication. my app successfully run and completer google signin.
But when i develop my second project on the firebase i do the same thing like add SHA1 and add support email, but when i tried to google signin from my app , it shows
sign_in_failed, com.google.android.gms.common.api.ApiException: 12500
I don't know why this error come.
Is there any condition that
1) we can't use a same SHA1 key to a different apps.
2) we can't user the same email id for 'support email' inside the google sign for the two projects
or please tell me there is any other condition regarding the using of multiple project on a same account of firebase.
Input both SHA-1 and SHA256.
Make sure you have added a Support Email.
Update Google Play Services.
If all of these fail, delete your keystore and generate a new one.
These are the issues that cause that error.
I had this error ApiException: 12500 for a long time. I have tried everything:
remove my debugkeystore, recreate one
add a support email on the firebase console
change plugin versions
update google on my device
Nothing worked but looking for a solution I found:
I went to this page (https://console.developers.google.com/apis/credentials) Select your project from the list (top left). Then go to "Oauth consent screen"
I filled out the app's logo and link on the app's homepage and application's privacy policy link (with the project.firebaseapp.com), and then saved.
enter image description here
After that it was good. I believe the official documentation should be updated.
For more information visit this link
enter link description here

Firebase Cloud Functions: Send Email via Authentication System

Firebase Authentication has a built in email service. Is it possible to fire an auth based email via Cloud Functions (admin js sdk)?
Seems like I should be able to trigger an email from noreply#my-domain.com with a custom oob code which I could then use to drive my (client-side) application.
My use case would be, when a new order .collection("orders").doc(uid) has its stage field updated/changed to 'submitted' I would like to notify a user via email that a new order is submitted. Maybe even use the oob code to mark as 'processed'?
...just trying to avoid using a 3rd party email service altogether.
you can use MailChimp to do what you are asking, since like Miles says, you will need to do a workaround in order to fix this.
I have been using MailChimp my self to send emails to each user registered in my app , i have setup a couple of emails in mailchimp and i just add to the list all the users that register to my app, so the first message will be the welcome message, then after 2 days another email and so on, you can trigger an email whenever you want, since the doc is not that clear i have made a tutorial on how to integrate it with Android.
you can find that tutorial HERE , the only thing is that is in spanish, sorry.
The idea is simple, just get your users email throught FirebaseAuth , pass that email to the mailchimp query , and then setup an email from the mailchimp website
Unfortunately, their API does not appear to support emailing users in your project. However, they have sample code for cloudfunctions to email users you can easily tweak for your needs: https://github.com/firebase/functions-samples/tree/master/quickstarts/email-users

Google Oauth client was deleted. can I restore a new one?

We running a wordpress website use google oauth for third-party social login. (via WP Social Login plugin.) Former engineer is leave, and we cannot have past google account credential.
We face a problem shows:
Error 401
Error: deleted_client
The OAuth client was deleted.
but we can only see old client id and secret from website admin panel.
I wanna to know,
if we set up a new google oauth application id/secret, will it make user crash from login website?
Or, is it possible for us to restore/retrieve former application ownership and make it live again?
This happened to me when I was working on an Add-On (maybe not completely related to this question but similar). I mistakenly deleted a Client ID that I thought we weren't using.
How I solved it:
Created a new project in Google Cloud
Associated the Apps Script project (Add-on) to this new Google Cloud project
Then I re-associated the App Script project with my previous Google Cloud project
The previous step will re-compile, create and associate the Client ID to the App Script project. It will contain all settings from the Client ID manually created and associated with your project in the code.
Maybe this will give some light to anyone having a similar problem.
Here use this link:
https://support.google.com/cloud/answer/6251787?hl=en
You have to reach google and they will help you out, this is the only solution you can do.
In my case, the simplest/only path (though certainly not ideal) ended up being to create a new Firebase project and start using that.
This of course can be problematic if you have a lot of data to move and/or a nontrivial data schema - say, with nested collections. For me, it was worth the effort to get unblocked from Sign-In suddenly failing to work.
... ah, OAuth fun
=======
If you are trying to make the new Client ID work .. though it's not a total solution, but after searching for a while, found this config option in Firebase console - where you enable Google Sign In.
So if you generate a new OAuth Client ID, update the ID & secret there.
After I did this, it went from a 401 error to a 400 mis_direct , which I think was step in the right direction.

Resources