# How to check if user is signed in? (Firebase Auth)

**URL:** <https://community.thunkable.com/t/how-to-check-if-user-is-signed-in-firebase-auth/56875>\
**Category:** Questions about Thunkable X\
**Created:** [November 18, 2018, 3:57am UTC](https://community.thunkable.com/t/how-to-check-if-user-is-signed-in-firebase-auth/56875 "2018-11-18T03:57:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Natoli](https://avatars.discourse-cdn.com/v4/letter/j/5e9695/32.png) [@John\_Natoli](https://community.thunkable.com/u/John_Natoli)\
**Post date:** [November 18, 2018, 3:57am UTC](https://community.thunkable.com/t/how-to-check-if-user-is-signed-in-firebase-auth/56875/1 "2018-11-18T03:57:18Z")

</div>

This is my first time using Thunkable. I’ve successfully created a Sign Up where I can see that new users are being added to the Firebase Authentication. However, how should I go about checking if the current user is logged in throughout the screens of the app? For example, if I want certain screens to only be available to signed in users. Also, how do I retrieve user information such as ID and email, so that I can associate user inputs in the Realtime DB with the appropriate user? Thank you!

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [November 18, 2018, 3:54pm UTC](https://community.thunkable.com/t/how-to-check-if-user-is-signed-in-firebase-auth/56875/2 "2018-11-18T15:54:34Z")

</div>

To do this, you need to make an additional field in the database and, when entering the database, write the user status to the global variable. If it is a subscriber, then true. Before opening each protected screen (or before going to the screen), you check the value of this variable. If true, then you give the opportunity to see the information to the subscriber (or go to this screen).

---

<div class="post-metadata">

**Author:** ![John\_Natoli](https://avatars.discourse-cdn.com/v4/letter/j/5e9695/32.png) [@John\_Natoli](https://community.thunkable.com/u/John_Natoli)\
**Post date:** [November 18, 2018, 7:24pm UTC](https://community.thunkable.com/t/how-to-check-if-user-is-signed-in-firebase-auth/56875/3 "2018-11-18T19:24:56Z")

</div>

Thank you for replying! However, how would I know if the user logs out, by uninstalling the app, for example, so that I know to update the user status in the DB?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [November 19, 2018, 5:57am UTC](https://community.thunkable.com/t/how-to-check-if-user-is-signed-in-firebase-auth/56875/4 "2018-11-19T05:57:59Z")

</div>

What do you need to know if the user deleted the application? Are you afraid that there will be many empty subscriptions in the database - the user has deleted the application, and its status in the database exists?

If the subscription is free, then it can operate until the subscriber unsubscribes from it. From time to time you can do a mailing to the mailing addresses of subscribers with announcements, and at the end of the letter give a link to unsubscribe. If the user clicks it, you will see that the subscription has been canceled.

If the subscription is paid, then it is valid for some time, after which a notification is sent to the user that the subscription ends. If there is no response from the user, then when the subscription expires, it is automatically deleted.

---

<div class="post-metadata">

**Author:** ![37abdulallam378i6](https://avatars.discourse-cdn.com/v4/letter/3/848f3c/32.png) [@37abdulallam378i6](https://community.thunkable.com/u/37abdulallam378i6)\
**Post date:** [July 24, 2021, 2:00pm UTC](https://community.thunkable.com/t/how-to-check-if-user-is-signed-in-firebase-auth/56875/5 "2021-07-24T14:00:25Z")

</div>

How do I write a code(blocks) where my app will auto check the paid subscription from database and then give access to full functionality?

---

<div class="post-metadata">

**Author:** ![37abdulallam378i6](https://avatars.discourse-cdn.com/v4/letter/3/848f3c/32.png) [@37abdulallam378i6](https://community.thunkable.com/u/37abdulallam378i6)\
**Post date:** [July 24, 2021, 2:01pm UTC](https://community.thunkable.com/t/how-to-check-if-user-is-signed-in-firebase-auth/56875/6 "2021-07-24T14:01:10Z")

</div>

Also paid subscription will end automatically after a month

---

<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:** [July 24, 2021, 2:20pm UTC](https://community.thunkable.com/t/how-to-check-if-user-is-signed-in-firebase-auth/56875/7 "2021-07-24T14:20:56Z")

</div>

You are writing unrelated content in a post **3 years old**. What benefits are you seeking?

These questions have no connection with this post.

---

<div class="post-metadata">

**Author:** ![37abdulallam378i6](https://avatars.discourse-cdn.com/v4/letter/3/848f3c/32.png) [@37abdulallam378i6](https://community.thunkable.com/u/37abdulallam378i6)\
**Post date:** [July 25, 2021, 1:58pm UTC](https://community.thunkable.com/t/how-to-check-if-user-is-signed-in-firebase-auth/56875/8 "2021-07-25T13:58:56Z")

</div>

K. I will post as a new query

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 11:52am UTC](https://community.thunkable.com/t/how-to-check-if-user-is-signed-in-firebase-auth/56875/9 "2024-11-08T11:52:43Z")

</div>


