Skip to content

Instantly share code, notes, and snippets.

Last active March 8, 2021 02:23
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
import { Injectable } from '@angular/core';
import * as firebase from 'firebase';
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('')">Reset Password</button>
import { Component } from '@angular/core';
import { AuthService } from "./somewhere/auth.service";
// omitted...
export class ResetPasswordComponent {
resetPassword(email: string) {
Copy link

Hi, how can i redirect user back to webpage after password has been reset?


Copy link

ghost commented Apr 19, 2018

just give a router link to a webpage or login page.

Copy link

@yashgandhi303 can you give me an example code pls? thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment