Creating login page

Hi. So I'm a beginner to App Inventor, and I'm trying to create a login page which allows only registered users to login. I'm trying to make a hospital app where only doctors having already registered email and password can login (there's no sign in option), and when a doctor logs in only their profile page should be visible to them and other staff's profile pages should be hidden.

So I tried with Firebase and created dummy email and passwords in Firebase, but I'm unable to go past the log in page even after entering correct login details. I also don't know how to create different profile pages for each user and keep it hidden from other users.

Is this question related to this? :slight_smile:

Yes but I'm having trouble understanding how Firebase works :sweat_smile:

You appear to be mixing the Firebase REST api approach (with web component) with the firebase experimental component by MIT. Use one or the other. For authentication, when using the MIT component, you will need to use an extension to help you: FirebaseAuth.


So can you please explain the purpose of Web1 and what tbEmailLogin and ptbPasswordLogin are?


I have now created extension. What should I do next?

I have done like this....Is it right? What else should I do?

Web1 sends the url to firebase requesting a sign in of an authenticated user

tbEmailLogin.Text should contain the the email address of the authenticated user
ptbPasswordLogin.Text should contain the password of the authenticated user

This assumes that you have successfully signed up an authenticated user in the first place.

I have not used the FirebaseAuth extension, but the blocks provided should do much the same thing.

I tried like this but it's still not working....What's the mistake?

Again, you are mixing the two things together.

Either:

use the web component REST api method

Or:

use the component/extension blocks method

You should be looking to sign up a user before trying to sign in

Oh then can you please explain the REST api method? I literally know nothing and as I mentioned earlier it has no sign up options. That's why I want to use dummy emails which are already authenticated by Firebase. Is there a way to do it?

??? see here: