User is automatically signed in after app install

Hello!

I’ve been trying to make a login system that automatically signs in Users once they login using their Mobile Number. However, the User “Is Signed In” function returns TRUE even when the user first installs the app

Also, once the user has logged in using Mobile Authentication, He/she is supposed to be taken to a new screen and doesn’t have to login in again, but the “If” component containing the “Is Signed in Function” fails to activate (Even though the result is “true”).

Could anyone point out what I’m doing wrong with the blocks?

Thanks!

Sign in Error

this will not work when user clear his app data or reinstall app, will works only when user login and close app and visit again, until he logout. so when user visiting first time or reinstall app he must need to login again.

Thanks for the info! But, to be more clear, I have 2 cases that have been bothering me:

Case 1: When the user installs app for the first time, the “Is User Signed In” function, logically MUST return false, but returns True in my case (Don’t know why). I don’t want it to be True and I’m not sure why it keeps returning true even when the user Installs app for the first time and hasn’t even logged in.

Case 2: After the user logs in, the “Is User signed in” function return True even when the user closes the app and opens it again, but the “if” block containing “Get Current User” and “open new screen” doesn’t work. I would like to make it work.

Are you using any extension for OTP login ?

image

I learned that I have to do this:

image

the "Call Mobile.Authentication .is signed in will return false or true and

the then block is ALWAYS resolved

because you have not set a condition.

I made the same mistake to misunderstood “call xyz .is connected” . The result will be false or true. And the then block only should be resolved, if xyz.is connected is true.

It would be better if this block would be named as “call xyz. connected” without is

No. Just the ones provided in the Firebase Authentication component by Kodular.

I just tested opening a new screen without using a logical “equal to” block like you mentioned and it seems to work just fine.

After debugging I seem to believe there’s something wrong with the “Get Current User” function.