FireBase Authentication Not Working in iOS

is anyone else having issues when trying to authenticate in Firebase from iOS? Last days my app started failing/ Web and Andoird looks is working fine so far.

This issue started few days ago. Very low occurrence in web and android. iOS just not working.

Message got from firebase: permission_denied at /Users/[user-id-here]/PostsToView Cliente doesn’t have permission to access the desired data.**

3 Likes

Hey @josepandare02t, I just responded to you over on Github :slight_smile:

Can you provide a minimal example of this issue? I am unable to reproduce this on my side and your app has a lot more going on besides just authentication making it harder to debug completely.

By the way, here is the project I mention there
https://x.thunkable.com/projectPage/61cdef060452400010879fbd

my rules are like this

and DB structure like this

3 Likes

See my observation…
image

You are trying to access the Firebase DB before you login and authenticate.

3 Likes

nice catch @muneer ! this could be part of the issue if this bucket is also locked down by UID

2 Likes

That is my assumption. When using from the web, you will be using your GMail ID that is connected to Firebase DB and you are the owner of the DB and therefore it will not fail.

1 Like

Thanks for the observation. I will locate this cloud var just after the authentication, however, web and android working fine and that var is out of the user id data, it is just on the DB root for all users. I will be sharing a video in a couple of hours or less. Will check also moving the var you mentioned.

1 Like

Just to show the var location in the DB

I would guess this is due to the fact that the email name used (GMail) is the same as the email name you are using for the Firebase DB. This is nor the case for iOS.

Yes, I can tell from the blocks that it is a root key (master bucket)

A good way to test is to go to the DB rules and change them to have no security/restriction and test your app again.

Tested with no security before and was working fine.

I have changed the var asignation (cloud) after the authentication block and now is working fine. Actually, I changed this few days ago wrongly positioning it before sign-in block.

Thanks for the support.

2 Likes

Welcome any time.

1 Like

@muneer Why is my app still unable to get data after logging in?

Hey @tony.ycy.program can you show the blocks that you’re using for your login flow and then where you’re trying to capture/push data?


Screenshot 2022-01-22 21.48.57

You probably want /info And not info For your user bucket in the cloud variable

So you want it to be like this with 2 slashes userAccount/stored variable uID/info

1 Like

It’s ok now. But I can’t get value next open app.

Sorry, I don’t understand what you mean here. Can you rephrase a different way?

1 Like

When I log in, I can get the data, but the next time I open it, I can’t get it.
Does thunkable change the login data to temporary data?

1 Like

You are using a stored UID which means even if the login is not successful the variable will still hold the information from last login. which could be the reason you are not getting the info.

Can’t say more without seeing the complete blocks for Sign In and what happens to the UID variable from the point the app is opened.

1 Like

I mean without getting data within normal login rules (opening the app a second time after login)

Great question. Let me look into this!