feat(auth): add recover and reset password functionality
This commit is contained in:
parent
c8f2d16f07
commit
2305e83647
6 changed files with 322 additions and 0 deletions
|
@ -77,6 +77,14 @@ export class AuthService {
|
|||
public verifyEmail(token: string): Observable<unknown> {
|
||||
return this.http.post<unknown>(`${this.authUrl}/verify?token=${token}`, null);
|
||||
}
|
||||
|
||||
public recoverPassword(email: string): Observable<unknown> {
|
||||
return this.http.post<unknown>(`${this.authUrl}/recover-password?email=${email}`, null);
|
||||
}
|
||||
|
||||
public resetPassword(token: string, password: string): Observable<unknown> {
|
||||
return this.http.post<unknown>(`${this.authUrl}/reset-password`, { token, password });
|
||||
}
|
||||
|
||||
private setToken(token: string): void {
|
||||
localStorage.setItem(TOKEN_KEY, token);
|
||||
|
|
Reference in a new issue