[Free] Extension to Sign-up & Sign-in with email and password using (Firebase Authentication)

This extension was created by Mr. Koder provides a set of functions and events for easily integrating Google Firebase Authentication into your App Inventor projects. It enables you to handle user registration, login, and management within your app, all powered by Firebase's secure and reliable authentication service.





4


Key Features:

  • Registration & Login:

    • signIn(String email, String password): Logs in a user with their email and password.

    • signUp(String email, String password): Registers a new user with an email and password.

    • signInAnonymously(): Allows users to sign in anonymously without creating an account.

  • User Management:

    • getUserData(String idToken): Retrieves user data, including email, display name, and other information.

    • sendEmailVerification(String idToken): Sends an email verification link to the user's email.

    • deleteAccount(String idToken): Deletes a user's account.

    • sendPasswordResetEmail(String email): Sends a password reset email to the provided email address.

    • changePassword(String idToken, String newPassword): Allows users to change their password.

    • changeEmail(String idToken, String newEmail): Allows users to change their email address.

    • updateProfile(String idToken, String displayName, String photoUrl): Updates a user's display name and profile picture URL.

  • Event-Driven Architecture: The extension utilizes events to notify you of the outcome of each operation.

    • Success events: e.g. SignInSuccess, SignUpSuccess, GetUserDataSuccess.

    • Failure events: e.g. SignInFailure, SignUpFailure, GetUserDataFailure.

    • Error events: e.g. SignInError, SignUpError, GetUserDataError.

Getting Started:

  1. Install: Download the extension and add it to your App Inventor project.

  2. Configure:

  • Set the ApiKey property with your Firebase Authentication API Key.
  1. Utilize: Use the extension functions to handle authentication and user management within your app.

  2. React to Events: Handle the provided success, failure, and error events to provide feedback and handle potential issues.


Setting Up Firebase for the SignWithEmailAndPassword Extension

Here's how to set up Firebase to use the SignWithEmailAndPassword extension for authentication in your App Inventor project:

1. Create a Firebase Project:

2. Enable Email/Password Authentication:

  • In your Firebase project, go to the "Authentication" section.

  • Click the "Sign-in method" tab.

  • Enable the "Email/Password" method.

3. Add a Web App to Your Firebase Project (Optional):

  • If you want to use Firebase's web SDK for authentication, follow these steps:

    • In the Firebase console, click "Add App" and select "Web".

    • Give your web app a nickname (e.g., "My Web App").

    • Click "Register App".

    • You will see your Firebase configuration details, including the apiKey.

4. Get Your API Key:

  • In the Firebase console, go to "Project settings" > "General".

  • Scroll down to "Your apps" and click on the web app you registered (if you did).

  • You will find the apiKey value. Copy this value.

5. Set the API Key in the Extension:

  • Open your App Inventor project.

  • Locate the SignWithEmailAndPassword component.

  • Set the ApiKey property to the apiKey you copied from Firebase.

6. Test Your Setup:

  • Build and run your App Inventor project.

  • Attempt to sign up or sign in with a valid email and password.

  • Observe the events triggered by the extension (e.g., SignInSuccess, SignUpSuccess, SignInFailure).


Donation

If you find this extension helpful and want to support its ongoing development, you can donate via PayPal:

Your contributions will help to:

  • Enhance existing features: Add new functionality, improve performance, and address bugs.

  • Develop new features: Expand the extension's capabilities with additional Firebase integration or user management tools.

  • Provide ongoing support: Ensure users have access to comprehensive documentation, tutorials, and prompt assistance.

Every donation, big or small, is greatly appreciated and helps to ensure the continued success of this project.


Aix File

You can download aix from here
:arrow_down: Aix_File_V1

:arrow_down: Aix_Fixed_File_V2


Tutorial aia file

:arrow_down: SignWithE-mail/Password.aia (2.5 MB) add your Firebase API key


my website that has all of my extensions

https://ahmed2300.github.io/extensionslake.github.io/


also check :

[Free] ⭐ Extension to sign-in with Google account

8 Likes

Thanks for this useful extension,
If mobile Authentication Added it will be more useful as we get nearly 10,000+/month SMS for free

2 Likes

Thanks ,
I will try to add it I am doing my best .

1 Like

Does anybody know how to setup this Ext in the Blocks so that it works?

Hi all.

I have this issue where I get an Argument Error.

I am Using SignWithEmailandPassword Ext

Runtime Error:
callTo
'SignWithEmailAndPassword1$SignUpFailure' has too few arguments (1; must be 3)

The thing is I get this Error, but it does create the User in Firebase and I can then Login with the Email and Password.

Problem is after Successfull Registration my Blocks says that it must redirect to the Login screen. But because of this error. It doesn't do this.
Error



DonationApp.aia (521.9 KB)

See the .aia File

The extension works well!
just make sure that you enabled this Email/Password Authentication method for your firebase project :arrow_down:

@Black_Knight

seems FA for email/pass is setup ?

@Black_Knight

Yes I have this Enabled

Hi, how to setup 'recovery password' feature?

You cannot recover a password from Firebase Authentication (they hash it so do not know what your password is).

You would need to store the password in your app when it is typed in in order to be able to provide a user with a recovery process.

You can create/reset to a new password with Firebase Authentication.

1 Like

How can we reset the password? Reset means? is it about getting the stored password back or re-creating new password?

If it is possible to recreate/reset new password, then how can we do that?

There are blocks in the extension to do this.

You cannot get the current password back from Firebase (2)

1 Like

Im am using another fire base login extension that was created by you. Can I find blocks in that extension as well?

This one. Can i reset password in this?

really, I do not remember making one ?

AI2FBRegLogBlank (1).aia (8.0 KB)

No extensions there.

Regardless, we are going off topic. This topic is about the extension in the first post. If you do not have direct questions about it, then ask in the correct place.

okay. Sure.

Can you help me with blocks to reset password?