# 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:** 8\
**Page:** 2

<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 23, 2022, 12:24am UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/21 "2022-01-23T00:24:58Z")

</div>

What if there is no verification?

---

<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 23, 2022, 2:41am UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/22 "2022-01-23T02:41:18Z")

</div>

first I login

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/a/6ab1020bf6d04296d773b1e8e2530b3c9d2365c0.png)  
then I reload page  
and open app  
but I can’t load data?  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/c/ac0c3118ef5407ca57837857637af0f2a80253a1.png)

```auto
That is a problem

```

---

<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 23, 2022, 2:45am UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/23 "2022-01-23T02:45:42Z")

</div>

> [@muneer](#):
>
> 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.

but I can load data first after logn (before reopen 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 23, 2022, 3:19am UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/24 "2022-01-23T03:19:52Z")

</div>

What happens when you do this in your phone?

---

<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 23, 2022, 3:32am UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/25 "2022-01-23T03:32:11Z")

</div>

same

---

<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 23, 2022, 3:41am UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/26 "2022-01-23T03:41:02Z")

</div>

Can you share your project in a DM. I’m imagining you have a block combo that is clearing the users state OR there is some kind of potential bug.

The Firebase SDK actually refreshes the users login automatically and should stay logged in until logged out or the app is fully closed.

So, closing the app and coming back to it on the computer should log the user out. But minimizing an app on your phone should allow you to come back and still be logged in.

---

<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 23, 2022, 12:49pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/27 "2022-01-23T12:49:35Z")

</div>

The `Sign In` component provide the developer with the `UserID` and in the same time it provides the native code with the `token`. When you reload the page, the `token` is not available anymore but the `UserID` is available because you are saving it is a `stored variable` but now without a **token**.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [April 23, 2022, 12:49pm UTC](https://community.thunkable.com/t/firebase-authentication-not-working-in-ios/1664663/28 "2022-04-23T12:49:51Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

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