Use of "firebase email & password authentication" component + conditional Dismiss initial view

I thought it was for login.
(It is not, as it does not follow the documentation for signInWithPassword since the ‘returnSecureToken’ param is missing). So what’s its use?

It is for login, but this flow is built differently, not on the REST API calls for Firebase auth, but instead included with some of the other methods. So for that, you can read more here:

But for your use case this might also be useful, as the mentioned flow does return a refreshToken:

1 Like

Thanks, got it.
That’s why my sign-in did not work, it needs extra settings (library) which I have not done (too scary!).

I’m sticking to the basic rest API, which works :+1:

Now that firebase security is enabled, how to allow signed-in user to access other pages after the ‘open page’ function? (I see info all over the place in the forum)

“Dismiss initial view” flow from the marketplace. But you can find that flow by default on the login page that comes pre-built with the Firebase Auth, when you enable that. I would definitely stick to this logic flow. Neither “open page” nor “replace page” can’t do the navigation after login that well as the “Dismiss initial view” flow.

1 Like

Right, I saw it taking me to Home page by default but I have a condition: if new user, then go to Profile page, if already exists, go to Dashboard.

Well then, something like this might work:

Create an app variable authState in which you describe a word which you will check with an IF condition on the Global Canvas.

On the Global canvas logic add a new event “App variable authState has changed”.
Add an if, check what you want and then do a “replace page” flow to replace the page to the one that you want.

Do you recommend any delay so that this flow:

has time to process before ‘Dismiss initial page’ fires here:

This needs some testing. I don’t feel the need as the logic on the global canvas is triggered after the set app variable, almost at the same time as the dismiss initial view, so that should not be an issue.