Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
♻️ Use /auth/link for token links
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Nov 16, 2020
1 parent 4dd62ef commit 9a9cca5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/modules/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export class AuthService {
days: 7,
link: `${this.configService.get<string>(
'frontendUrl',
)}/auth/verify-email?token=${this.tokensService.signJwt(
)}/auth/link/verify-email?token=${this.tokensService.signJwt(
EMAIL_VERIFY_TOKEN,
{ id: emailDetails.user.id },
'7d',
Expand Down Expand Up @@ -355,7 +355,7 @@ export class AuthService {
minutes: 30,
link: `${this.configService.get<string>(
'frontendUrl',
)}/auth/reset-password?token=${this.tokensService.signJwt(
)}/auth/link/reset-password?token=${this.tokensService.signJwt(
PASSWORD_RESET_TOKEN,
{ id: emailDetails.user.id },
'30m',
Expand Down Expand Up @@ -563,7 +563,7 @@ export class AuthService {
),
link: `${this.configService.get<string>(
'frontendUrl',
)}/auth/token-login?token=${this.tokensService.signJwt(
)}/auth/link/login%2Ftoken?token=${this.tokensService.signJwt(
EMAIL_MFA_TOKEN,
{ id: user.id },
'30m',
Expand Down Expand Up @@ -624,7 +624,7 @@ export class AuthService {
minutes: 30,
link: `${this.configService.get<string>(
'frontendUrl',
)}/auth/reset-password?token=${this.tokensService.signJwt(
)}/auth/link/reset-password?token=${this.tokensService.signJwt(
APPROVE_SUBNET_TOKEN,
{ id },
'30m',
Expand Down
2 changes: 1 addition & 1 deletion src/modules/users/users.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export class UsersService {
minutes,
link: `${this.configService.get<string>(
'frontendUrl',
)}/auth/merge-accounts?token=${this.tokensService.signJwt(
)}/auth/link/merge-accounts?token=${this.tokensService.signJwt(
MERGE_ACCOUNTS_TOKEN,
{ baseUserId: userId, mergeUserId: user.id },
`${minutes}m`,
Expand Down

0 comments on commit 9a9cca5

Please sign in to comment.