Angular 4 Firebase Password Reset Email https://angularfirebase.com/lessons/angular-firebase-authentication-tutorial-email-password-signup/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import * as firebase from 'firebase'; | |
//...omitted | |
@Injectable() | |
export class AuthService { | |
resetPassword(email: string) { | |
var auth = firebase.auth(); | |
return auth.sendPasswordResetEmail(email) | |
.then(() => console.log("email sent")) | |
.catch((error) => console.log(error)) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button (click)="resetPassword('hello@angularfirebase.com')">Reset Password</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { AuthService } from "./somewhere/auth.service"; | |
@Component({ | |
// omitted... | |
}) | |
export class ResetPasswordComponent { | |
resetPassword(email: string) { | |
this.auth.resetPassword(email) | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@yashgandhi303 can you give me an example code pls? thank you