Nest Function with Update on Stored variable

I have tested calling a function inside another function and Updating a stored variable in the nested function but it didn’t work. It only works when the function that is updating is called separately not nested. Here is a screenshot of the Functions Implementations.

When I call SignUp (SignIn doesn’t update the stored variable), however, when I call sign in afterwards it works. I hope this note can help someone, and if it is not a bug and there is a problem with my logic, let me know.

1 Like

The code is missing how you initialize the stored variable and how you check it.

The Sign In component only returns UserId for verified emails. Your code if not dealing with IsEmailVerified and what you think is not being stored is actually an email who just registered and not yet verified.

@muneer regarding the initialization it is initialized and values are declared before calling Sign Up function.

Regarding Verified emails, I already allowed registration without verification on Firebase, therefore, I get a userId when I call Sign In.

The issue as mentioned is that calling Sign In inside Sign Up is not Changing the Value in UserData (Property User ID). However, if you call Sign Up separately, then another call to Sign In it works Perfectly.

How did I check it?
I have tried to call it inside Sign Up and Another Trial with Sign In in a separate function call, then I display the data using a label.

Hope that answered the points you raised!

1 Like

What exactly you mean by this?
Does the SignIn function shows a message? Or terminates with return of false?