optimize account creation and verification

This commit is contained in:
Krrish Ghimire
2026-07-10 15:11:20 +05:45
parent bbd6e6d007
commit a3f9cef883
14 changed files with 135 additions and 60 deletions

View File

@@ -14,8 +14,8 @@ export class AuthService {
constructor(private http: HttpClient) {}
register(name: string, email: string, password: string): Observable<{ message: string }> {
return this.http.post<{ message: string }>('/api/auth/register', { name, email, password });
register(email: string): Observable<{ message: string }> {
return this.http.post<{ message: string }>('/api/auth/register', { email });
}
login(email: string, password: string): Observable<AuthResponse> {
@@ -41,8 +41,8 @@ export class AuthService {
return this.http.post<{ message: string }>('/api/auth/resend-verification', { email });
}
setPassword(setupToken: string, password: string): Observable<void> {
return this.http.post<void>('/api/auth/set-password', { setupToken, password });
setPassword(setupToken: string, password: string, name: string): Observable<void> {
return this.http.post<void>('/api/auth/set-password', { setupToken, password, name });
}
getAccessToken(): string | null {