I believe there is a way for changing your password in Firebase but is there a way where the user forgets the password and can be assigned a new one or re-authenticated using email or SMS OTP. I checked out on the net but couldn't seem to find one.
If there is a way how can it be implemented, what all function calls need to be made. Could you direct me with an example.
It sounds like you're looking to send a password reset email. See this example from the Firebase documentation:
FirebaseAuth.getInstance().sendPasswordResetEmail("[email protected]")
.addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
if (task.isSuccessful()) {
Log.d(TAG, "Email sent.");
}
}
});