Forgot Password (#1017)
* Implemented forgot password flow. Fixed a bug in manage user where admins were showing the Sharing With section. * Cleaned up the reset password flow. * Reverted some debug code * Fixed an issue with invites due to ImmutableArray not being set.
This commit is contained in:
parent
8564378b77
commit
8ff123e06c
27 changed files with 271 additions and 38 deletions
|
@ -130,6 +130,14 @@ export class AccountService implements OnDestroy {
|
|||
return JSON.parse(atob(token.split('.')[1]));
|
||||
}
|
||||
|
||||
requestResetPasswordEmail(email: string) {
|
||||
return this.httpClient.post<string>(this.baseUrl + 'account/forgot-password?email=' + encodeURIComponent(email), {}, {responseType: 'text' as 'json'});
|
||||
}
|
||||
|
||||
confirmResetPasswordEmail(model: {email: string, token: string, password: string}) {
|
||||
return this.httpClient.post(this.baseUrl + 'account/confirm-password-reset', model);
|
||||
}
|
||||
|
||||
resetPassword(username: string, password: string) {
|
||||
return this.httpClient.post(this.baseUrl + 'account/reset-password', {username, password}, {responseType: 'json' as 'text'});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue