# FireBase Authentication Not Working in iOS

**URL:** <https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663>\
**Category:** Questions about Thunkable X\
**Created:** [January 3, 2022, 2:41pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663 "2022-01-03T14:41:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![josepandare02t](https://avatars.discourse-cdn.com/v4/letter/j/91b2a8/32.png) [@josepandare02t](https://community.thunkable.com/u/josepandare02t)\
**Post date:** [January 3, 2022, 2:41pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/1 "2022-01-03T14:41:39Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/3/d3e3a5f3adecce2980338d8d0851a53707520e88.png)

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.**\*\*

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [January 3, 2022, 2:51pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/2 "2022-01-03T14:51:59Z")

</div>

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

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](https://x.thunkable.com/projectPage/61cdef060452400010879fbd)

my rules are like this

 ![Screen Shot 2022-01-03 at 10.02.26 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/1/b1b4eb8d070adf5f4f7dd52e3ed0c13501571c4f.png)

and DB structure like this

 ![Screen Shot 2022-01-03 at 10.02.58 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/a/8a4f7bb1d9f87d65712d5368532da9b452b33a28.png)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [January 3, 2022, 3:10pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/3 "2022-01-03T15:10:44Z")

</div>

See my observation…  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/9/294105e3e597a6d9821f1f72fc537aa77502ce69.png)

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

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [January 3, 2022, 3:12pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/4 "2022-01-03T15:12:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [January 3, 2022, 3:17pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/5 "2022-01-03T15:17:52Z")

</div>

> [@jared](#):
>
> this bucket is also locked down by UID

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.

---

<div class="post-metadata">

**Author:** ![josepandare02t](https://avatars.discourse-cdn.com/v4/letter/j/91b2a8/32.png) [@josepandare02t](https://community.thunkable.com/u/josepandare02t)\
**Post date:** [January 3, 2022, 3:26pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/6 "2022-01-03T15:26:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![josepandare02t](https://avatars.discourse-cdn.com/v4/letter/j/91b2a8/32.png) [@josepandare02t](https://community.thunkable.com/u/josepandare02t)\
**Post date:** [January 3, 2022, 3:32pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/7 "2022-01-03T15:32:04Z")

</div>

Just to show the var location in the DB

 ![20220103_163058](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/8/d871fa5d1ff8bd0ee69761c83cc9b4f9c81a7095.jpeg)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [January 3, 2022, 3:41pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/8 "2022-01-03T15:41:23Z")

</div>

> [@josepandare02t](#):
>
> web and android working fine

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.

> [@josepandare02t](#):
>
> show the var location in the DB

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.

---

<div class="post-metadata">

**Author:** ![josepandare02t](https://avatars.discourse-cdn.com/v4/letter/j/91b2a8/32.png) [@josepandare02t](https://community.thunkable.com/u/josepandare02t)\
**Post date:** [January 3, 2022, 4:33pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/9 "2022-01-03T16:33:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [January 3, 2022, 4:34pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/10 "2022-01-03T16:34:29Z")

</div>

Welcome any time.

---

<div class="post-metadata">

**Author:** ![tony.ycy.program](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tony.ycy.program/32/100153_2.png) [@tony.ycy.program](https://community.thunkable.com/u/tony.ycy.program)\
**Post date:** [January 22, 2022, 1:23pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/11 "2022-01-22T13:23:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [January 22, 2022, 1:36pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/12 "2022-01-22T13:36:11Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![tony.ycy.program](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tony.ycy.program/32/100153_2.png) [@tony.ycy.program](https://community.thunkable.com/u/tony.ycy.program)\
**Post date:** [January 22, 2022, 1:49pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/13 "2022-01-22T13:49:54Z")

</div>

![Screenshot 2022-01-22 21.49.25](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/0/70c9310a84cd4650bd72478bcb530ed84d8178ba.png)  
 ![Screenshot 2022-01-22 21.48.57](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/5/c5de9d23cb7b24719ee5fb7bc4bb0b6c7899df4f.png)

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [January 22, 2022, 1:55pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/14 "2022-01-22T13:55:12Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![tony.ycy.program](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tony.ycy.program/32/100153_2.png) [@tony.ycy.program](https://community.thunkable.com/u/tony.ycy.program)\
**Post date:** [January 22, 2022, 2:03pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/15 "2022-01-22T14:03:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [January 22, 2022, 2:07pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/16 "2022-01-22T14:07:36Z")

</div>

> [@tony.ycy.program](#):
>
> But I can’t get value next open app.

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

---

<div class="post-metadata">

**Author:** ![tony.ycy.program](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tony.ycy.program/32/100153_2.png) [@tony.ycy.program](https://community.thunkable.com/u/tony.ycy.program)\
**Post date:** [January 22, 2022, 2:11pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/17 "2022-01-22T14:11:14Z")

</div>

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?`

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [January 22, 2022, 2:30pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/18 "2022-01-22T14:30:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tony.ycy.program](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tony.ycy.program/32/100153_2.png) [@tony.ycy.program](https://community.thunkable.com/u/tony.ycy.program)\
**Post date:** [January 22, 2022, 3:18pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/19 "2022-01-22T15:18:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [January 22, 2022, 8:13pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/20 "2022-01-22T20:13:12Z")

</div>

> [@tony.ycy.program](#):
>
> Does thunkable change the login data to temporary data?

Great question. Let me look into this!

[Next page](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663.md?page=2)
