# Firebase rules ok on webpreview not ok on live test or with apk

**URL:** <https://community.thunkable.com/t/firebase-rules-ok-on-webpreview-not-ok-on-live-test-or-with-apk/1664043>\
**Category:** Questions about Thunkable X\
**Created:** [January 2, 2022, 12:13pm UTC](https://community.thunkable.com/t/firebase-rules-ok-on-webpreview-not-ok-on-live-test-or-with-apk/1664043 "2022-01-02T12:13:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bibbi](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@bibbi](https://community.thunkable.com/u/bibbi)\
**Post date:** [January 2, 2022, 12:13pm UTC](https://community.thunkable.com/t/firebase-rules-ok-on-webpreview-not-ok-on-live-test-or-with-apk/1664043/1 "2022-01-02T12:13:20Z")

</div>

hi and happy new year everybody

I use minimum security rules like below

 ![Capture d’écran 2022-01-02 à 13.10.58](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/0/209ffc5b9b6df4f6e06454521f2873f4bb4410d0.png)

on the web preview I can read and write data on the other hand in live test I no longer have access to the data yet a headache in perspective !  
I thought using the sign in component and cloud variables to read or write to the database was enough.  
it only works in web preview mode I don’t know what else to do

---

<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, 1:48am UTC](https://community.thunkable.com/t/firebase-rules-ok-on-webpreview-not-ok-on-live-test-or-with-apk/1664043/2 "2022-01-03T01:48:17Z")

</div>

Can you explain more?

You need to share your codes or if you can have minimal project that can reproduce the situation so I can use it and test it in a demo database from my side using your rules.

---

<div class="post-metadata">

**Author:** ![bibbi](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@bibbi](https://community.thunkable.com/u/bibbi)\
**Post date:** [January 3, 2022, 8:00pm UTC](https://community.thunkable.com/t/firebase-rules-ok-on-webpreview-not-ok-on-live-test-or-with-apk/1664043/3 "2022-01-03T20:00:10Z")

</div>

hi

your support means that I took a closer look at the blocks that I thought I would submit to you and it turns out that the email I use for potential users was truncated and therefore did not match the email saved in firebase (there is no personal or reserved data in my database so I connect all users with the same email)  
on the other hand, I would like to know why it worked in web preview  
so now it’s ok in live test and with the apk 🙃

---

<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, 8:07pm UTC](https://community.thunkable.com/t/firebase-rules-ok-on-webpreview-not-ok-on-live-test-or-with-apk/1664043/4 "2022-01-03T20:07:26Z")

</div>

Hello @bibbi  
When you are in web view you are actually using your GMail account and you are already signed in to the web browser and most probably you are using the same email for your Firebase console where you are the owner of the database and therefore you can access the information. When you use your downloaded APK, it will not use the email sign-in in the browser and therefore you need to sign-in to the database to read the data.

Hope the explanation is clear.

---

<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 3, 2022, 8:08pm UTC](https://community.thunkable.com/t/firebase-rules-ok-on-webpreview-not-ok-on-live-test-or-with-apk/1664043/5 "2022-04-03T20:08:07Z")

</div>

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