-
Notifications
You must be signed in to change notification settings - Fork 148
Permissions denied when authenticating to Firebase in Xamarin.Android #178
Comments
So I was actually having this issue all day yesterday and figured I would try something new this morning and I got something to work! In my test app, I have a simple security rule setup in Firestore that looks like this:
Then in my code, I had to make sure that when I was creating my FirebaseAuth I used the same FirebaseApp object I used to create my database.
I suspect this workaround isn't needed with the latest version of the this library but I guess they are not updated for Windows on nuget and I wasn't able to figure out how to build them myself. And for reference, here are the versions of everything:
|
@DirtyRasa Hello, Sure, I tried that also and it works for that specific rule. However, my rules look something more like this:
In this case, that workaround do not work. |
This is a really big security issue, how long do you think until we get a new release ? @Redth |
Hello! |
@jehans @sdiaz-qkt @craigmart-in Could you try |
@moljac Hello, I'm trying to try Here's my code, hopefully you can help me figure out what's going on here so I can test
In the last line it throws the following error:
My mAuth variable is null which means the instance didn't succeed, not sure why. I also did it like this:
but the error remains the same. |
@sdiaz-qkt Can you provide some minimal repro sample? That would speed up investigation and fix. |
@moljac Ok, so I'm not sure if this is what you asked me but hopefully it will help. I uploaded a sample project in this link. |
I have the same error. Has anyone found a solution? |
@nnovalbos You should read all of the comments and see the dates before commenting. But I will answer you anyway. You can try |
@sdiaz-qkt Sorry, I did not notice. |
@sdiaz-qkt @nnovalbos @jehans @craigmart-in Please add nuget Xamarin.Android.ManifestMerger. It will add MSbuild targets that fix Manifest merging. And please provide info:
https://www.nuget.org/packages/Xamarin.Android.ManifestMerger/1.0.0-preview03 |
@moljac
|
Hi @moljac I added nuget Xamarin.Android.ManifestMerger but i got the same error. I'm using the following dependencies:
All of them with version 60.1142.1 |
Does anyone know any alternative to avoid this error? Thanks |
When I use
instance of
it works... |
Xamarin.Android Version (eg: 6.0):
Xamarin.Android = 9.1.0.38
Operating System & Version (eg: Mac OSX 10.11):
Windows 10 - Visual Studio Community 2017 15.9.2
Google Play Services Version (eg: 8.4.0):
Xamarin.Firebase.Firestore = 60.1142.1
Describe your Issue:
First, if I initialize my app to Firebase in Xamarin.Android in the same way is done in Xamarin.iOS by letting the application find what it needs in the json file, I get the error "projectID is null", which I found is an issue that is being handle (#104).
So, to address this error, since I don't know how long until the release of the fix, I initialize the app by telling it where to find the projectId. However this is not enough, since I can't authenticate to the Cloud Firestore due to the following error:
My rules request that the user id is not null and it must be the same as the document's name, and I need this for security reasons. So just changing the permissions in my rules is not an option.
In Xamarin.iOS this is not an issue! I had no problem with authenticating to firestore and accessing my documents.
Steps to Reproduce (with link to sample solution if possible):
Include any relevant Exception Stack traces, build logs, adb logs:
The error I'm facing is:
as mentioned before.
UPDATE:
This problem appears when my rule is :
(I failed to explained earlier when this became a serious issue for me, which is this! )
The text was updated successfully, but these errors were encountered: