We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f4ed4c commit 05f5654Copy full SHA for 05f5654
src/components/authentication/authentication.service.ts
@@ -48,7 +48,10 @@ export class AuthenticationService {
48
return token;
49
}
50
51
- async register(input: RegisterInput, session?: Session): Promise<ID> {
+ async register(
52
+ { password, ...input }: RegisterInput,
53
+ session?: Session,
54
+ ): Promise<ID> {
55
// ensure no other tokens are associated with this user
56
if (session) {
57
await this.logout(session.token);
@@ -67,7 +70,7 @@ export class AuthenticationService {
67
70
throw e;
68
71
69
72
- const passwordHash = await this.crypto.hash(input.password);
73
+ const passwordHash = await this.crypto.hash(password);
74
await this.repo.savePasswordHashOnUser(userId, passwordHash);
75
76
return userId;
0 commit comments