Sign in with firebase

These are all my codes. And my firebase users which show that the user has already been signed up and in however on the application, the user is unable to navigate to the food category list despite me already coding it to be navigated to that screen.



1 Like

I know you were replying to @muneer but… have you tried the debugging method(s) I described? You need to figure out why the single navigate block in your code isn’t firing. The only way to do that is to create visual signals within your blocks. Because after the sign in block starts, it runs the do section. So your task is to figure out where in the do section it’s getting stuck.

1 Like

This code should not work

Therefore the default action will be Sign Up and not Sign In.

This block has wrong conditions and will never reach the stage to navigate to another screen

I encourage you to use Direct Logic instead of Reverse Logic. Use IF isemailverfied instead of using NOT isemaiverified. You are more interested in what will happen when the email is verified. Leave the error message in the ELSE part.

Please follow the DEBUG approach mentioned by @tatiang so you know the flow of your codes.

1 Like

This is a problem, too:

The blocks will be evaluated this way:

  1. Is email verified true?
    No → “Please verify your email.”
    Yes → “Account Created!”

That’s it. Full stop. You’ve already checked to see if is email verified is true or false. The “else” section of that block will never fire. You can’t have a condition that says “if yes then do this, if no then do that, otherwise then do something else.” It’s either yes or no, true or false. There’s no third possible value for a binary block.

Change this so it says “if is email verified?” … / else …

Personally, I check for an error first, then if that’s false, I do the if/else with the email verified. I know it’s tempting to try to come up with a single block to handle all of those conditions but honestly, I think that’s where you’re struggling. There’s too much going on at once.

1 Like

Here’s what I would do:

And with debugging blocks:

That way, you can watch and see if this happens:
A
B
C
D

or maybe just
A
B

etc.

Then you know where the code stopped/skipped.

is this what you mean?

Possibly… does it work? You haven’t accounted for the green error block as I demonstrated in the screenshot above but as long as you’re not getting an error, that should be fine. It’s not good practice to place blocks after/below a navigate block because they will most likely not run but again, if it works then it works.

1 Like

hi, it does not work unfortunately i am not able to proceed to the next screen after verifying my account.

1 Like

ou haven’t accounted for the green error block as I demonstrated in the screenshot above
which do you refer to?

1 Like

And yet, you’re not providing any new details! And I still don’t know if you tried the debugging methods I suggested.

You can see the if error blocks here: Sign in with firebase - #26 by tatiang.

1 Like

It would be easier if you share the project link either here or in private message.

hi, I changed the codes that you have suggested however, there user after verifying the email is still not lead to the food category list

Then I would need a link to the updated project.

2 Likes

i cant share the link.

Can i pm you instead?

Sure, that’s fine. You can also copy the url from the Design page and send that if you like.

May i ask how do i copy the url from the design page?

When you’re working on the project, just copy and paste the url from your browser.

I added my own Firebase API and URL to the project you sent me. When I sign in with my own verified account, it takes me to the Food Category List screen:

I don’t see any evidence that you’ve tried debugging with label text and wait blocks, as I suggested. If it’s still not working for you, start there and report back your results with debugging blocks.

1 Like