Angularfire: How to use sendPasswordResetEmail?

Created on 24 Jul 2016  路  5Comments  路  Source: angular/angularfire

I see in this link sendPasswordResetEmail but somehow it's not supported when I use:

    this.af.auth.sendPasswordResetEmail({
      "email": email
    });

Any examples, or is this not yet implemented?

All 5 comments

Hi @mjabian,

Please look at my comment on #220, for a possible solution.

@julienevano
using this code

import { AngularFire, AngularFireAuth } from 'angularfire2';
import { Injectable } from '@angular/core';
//import * as firebase from "firebase";
//declare var firebase: any;

@Injectable()
export class AuthService {
firebaseAuth: AngularFireAuth;

constructor(private _AngularFire: AngularFire) {
this.firebaseAuth = _AngularFire.auth;
}

resetPassword(email: string): Promise {
return firebase.auth().sendPasswordResetEmail(email);
}
}`

console error --> Q {code: "auth/internal-error", message: "17"}

Looks like this can be closed as the answer can be found here: https://github.com/angular/angularfire2/issues/220#issuecomment-235373945

@Splaktar using #220 but console errror...
POST https://www.googleapis.com/identitytoolkit/v3/relyingparty/getOobConfirmationCode?key=AIza 503 login.ts:30 failed Error: 17

Was this page helpful?
0 / 5 - 0 ratings