To create automaticated log in on your apps first open your sketchwere ide than go to library component settings and and set switch on to appCompat and design and firebase.
set Firebase id’s to enable Firebase switched on see image given below
According to image set-up Firebase library
1. enter your project id.
2. enter your app id.
3.enter Api key.
4. enter storage bucket url
Add firebase auth component
Now in your project add two EditText widgets and two buttons. One EditText for email second for password. one button for login second for sign-up.
- In login button on click set blocks look like image given below
- add if else block than create condition if both edit text is empty than toast massage “fill required details” else add login with block.
- its sign in users who already authenticate with email.
- In sign-up button onclick use same conditions and in else condition add create user with block. see image below
Now add two events from component section 1. Oncreat user complete 2. onsignin user complete.
- In onCreate users complete event add control block and create condition if success than set screen to second page else show error massage.
- In Onsignin user complete add same block as onCreate user complete.
If you have any question leave in comments. thank you for visiting…