Skip to content
This repository has been archived by the owner on Apr 2, 2018. It is now read-only.

auth.requestPasswordReset(email) not working #32

Closed
mo-mueller opened this issue Nov 13, 2016 · 2 comments
Closed

auth.requestPasswordReset(email) not working #32

mo-mueller opened this issue Nov 13, 2016 · 2 comments

Comments

@mo-mueller
Copy link

I'm trying to implement the Ionic Cloud Auth Service and now I want to do the password reset like it is described here. So I have a text field where the user can enter his email and a button.

Here is my pw-reset.html:

<ion-header>
  <ion-navbar>
    <ion-title>New Password</ion-title>
  </ion-navbar>
</ion-header>

<ion-content padding>
    <ion-item>
        <ion-label color="primary" stacked>E-Mail</ion-label>
        <ion-input [(ngModel)]="email"></ion-input>
    </ion-item>
    <br />
    <button ion-button (click)="sendPasswordRequest();">New Password</button>
</ion-content>

And here is my pw-reset.ts:

import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { Auth, User, UserDetails, IDetailedError } from '@ionic/cloud-angular';
import { ConfirmPasswordResetPage } from '../confirm-password-reset/confirm-password-reset';

@Component({
  selector: 'page-pw-reset',
  templateUrl: 'pw-reset.html'
})
export class PwResetPage {
    email: any;

    constructor(public navCtrl: NavController, public auth: Auth) {}

    sendPasswordRequest() {
        this.auth.requestPasswordReset(this.email);
        this.navCtrl.push(ConfirmPasswordResetPage);
    }
}

And here are the errors which come when I click on the button:

error

@RandyLedbetter
Copy link

RandyLedbetter commented Nov 20, 2016

I am having the same issue when running "@ionic/cloud-angular": "^0.7.0".
The same this.storage 'undefined' error within Auth.requestPasswordReset(email:string). Version 0.6.0 produced the same error. Dialing the version back to 0.5.2 in package.json and running npm update allowed the email with the six digit code to be sent with my implementation, which is programatically similar to the original reporter's approach outlined above. Not great, but a temporary fix for those still in development.

@ericb
Copy link
Contributor

ericb commented Nov 22, 2016

Closing this as a duplicate of ionic-team/legacy-ionic-cloud#81

@ericb ericb closed this as completed Nov 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants