Skip to content

Commit 1b0bc6e

Browse files
authored
v3.0.6
* fix(profile): prevent `cannot read property '_getservice' of undefined` error - prescottprue#801 - @Zubnix * fix(types): fix arguments in `resetPassword` - prescottprue#803 - @magrinj * fix(docs): documentation about `resetPassword` - prescottprue#803 - @magrinj
2 parents 5fc4de5 + d1b8891 commit 1b0bc6e

8 files changed

+72
-230
lines changed

docs/api/firebaseInstance.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,7 @@ Sends password reset email
449449

450450
### Parameters
451451

452-
- `credentials` **[object][66]** Credentials for authenticating
453-
- `credentials.email` **[string][69]** Credentials for authenticating
452+
- `email` **[string][69]** Email to send recovery email to
454453

455454
Returns **[Promise][72]** Resolves after password reset email is sent
456455

docs/auth.md

+3-8
Original file line numberDiff line numberDiff line change
@@ -204,22 +204,17 @@ Looking to preserve data on logout? [checkout the `preserve` config option](/doc
204204
props.firebase.logout()
205205
```
206206
207-
## resetPassword(credentials)
207+
## resetPassword(email)
208208
Calls Firebase's `firebase.auth().resetPassword()`. If there is an error, it is added into redux state under `state.firebase.authError`.
209209

210210
##### Examples
211211

212212
```js
213-
props.firebase.resetPassword({
214-
email: 'test@test.com',
215-
password: 'testest1',
216-
username: 'tester'
217-
})
213+
props.firebase.resetPassword('test@test.com')
218214
```
219215

220216
##### Parameters
221-
* `credentials` [**Object**][object-url] - Credentials same as described in firebase docs
222-
* `profile` [**Object**][object-url] - if initialized with userProfile support then profile will be saved into `${userProfile}/${auth.uid}`
217+
* `email` [**String**][string-url] - Email to send recovery email to
223218

224219
##### Returns
225220
[**Promise**][promise-url] with user's UID in case of success or the error otherwise.

index.d.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -620,13 +620,10 @@ interface ExtendedAuthInstance {
620620

621621
/**
622622
* Sends password reset email.
623-
* @param credentials - Credentials for authenticating
623+
* @param email - Email to send recovery email to
624624
* @see https://react-redux-firebase.com/docs/auth.html#resetpasswordcredentials
625625
*/
626-
resetPassword: (
627-
credentials: AuthTypes.UserCredential,
628-
profile: UserProfile
629-
) => Promise<any>
626+
resetPassword: (email: string) => Promise<any>
630627

631628
/**
632629
* Confirm that a user's password has been reset.

0 commit comments

Comments
 (0)