Thursday, June 30

Android App : FirebaseDemo

Firebase is a cloud services provider and backend as a service company. Firebase's primary product is a realtime database which provides an API that allows developers to store and sync data across multiple clients.

Firebase Authentication Tutorial:
http://www.androidhive.info/2016/06/android-getting-started-firebase-simple-login-registration-auth/

Firebase automatically stores your users’ credentials securely (using bcrypt) and redundantly (with replication and daily off-site backups). This separates sensitive user credentials from your application data, and lets you focus on the user interface and experience for your app.

- Switch to the Project view in Android Studio to see your project root directory. Move the google-services.json file into your Android app module root directory.

- Add firebase auth dependency
compile "com.google.firebase:firebase-auth:9.0.2"

//Get Firebase auth instance
auth = FirebaseAuth.getInstance();
Methods used:
1. createUserWithEmailAndPassword()
2. signInWithEmailAndPassword()
3. (Another cool feature firebase provides is, sending reset password email when required.) sendPasswordResetEmail()
4. signOut();

FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
1. user.updatePassword()
2. user.updateEmail()
3. user.delete()

No comments:

Post a Comment