I recently attempted to implement the ability to reset a user's email and password in my Flutter application. It sent the email successfully but shortly after I clicked on the URL link I was met with a "Site Not Found". Multiple options on why this message was being displayed were listed below but they had to do with Firebase Hosting or using a custom domain which I use neither of them. I viewed multiple Youtube tutorials to see if they ran into similar problems but the link took them to a elegantly formatted website where they were able to reset their email or password. I am not sure why this problem is occurring but it might be due to the fact that I need a custom domain, although none of the Youtubers required it.
Below is the error I'm faced with on the site:
Below is the Flutter code:
Firebase Auth:
firebase_auth: ^0.17.0-dev.2
Reset password:
Future<void> resetPassword(String email) async {
await _authInstance.sendPasswordResetEmail(email: email);
}
Reset email:
Future<void> resetEmailAddress(
String newEmail, String oldEmail, String password) async {
var authResult = await _authInstance.signInWithEmailAndPassword(
email: oldEmail, password: password);
await authResult.user.updateEmail(newEmail);
await _instance
.collection('users')
.doc(authResult.user.uid)
.update({'email': newEmail});
}
Lastly I'm sorry for the lack of error checking and thank you for you time!
- Matt
