Angular 4 Firebase Password Reset Email https://angularfirebase.com/lessons/angular-firebase-authentication-tutorial-email-password-signup/
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)) | |
} | |
} |
<button (click)="resetPassword('hello@angularfirebase.com')">Reset Password</button> |
import { Component } from '@angular/core'; | |
import { AuthService } from "./somewhere/auth.service"; | |
@Component({ | |
// omitted... | |
}) | |
export class ResetPasswordComponent { | |
resetPassword(email: string) { | |
this.auth.resetPassword(email) | |
} | |
} |
This comment has been minimized.
This comment has been minimized.
just give a router link to a webpage or login page. |
This comment has been minimized.
This comment has been minimized.
@yashgandhi303 can you give me an example code pls? thank you |
This comment has been minimized.
This comment has been minimized.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
Hi, how can i redirect user back to webpage after password has been reset?
Thanks