From 9a9cca5d1f320805872c61cb7f727704e5d06b9e Mon Sep 17 00:00:00 2001 From: Anand Chowdhary Date: Mon, 16 Nov 2020 15:49:21 +0530 Subject: [PATCH] :recycle: Use /auth/link for token links --- src/modules/auth/auth.service.ts | 8 ++++---- src/modules/users/users.service.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/auth/auth.service.ts b/src/modules/auth/auth.service.ts index 1b831b84f..ac98a7cff 100644 --- a/src/modules/auth/auth.service.ts +++ b/src/modules/auth/auth.service.ts @@ -211,7 +211,7 @@ export class AuthService { days: 7, link: `${this.configService.get( 'frontendUrl', - )}/auth/verify-email?token=${this.tokensService.signJwt( + )}/auth/link/verify-email?token=${this.tokensService.signJwt( EMAIL_VERIFY_TOKEN, { id: emailDetails.user.id }, '7d', @@ -355,7 +355,7 @@ export class AuthService { minutes: 30, link: `${this.configService.get( 'frontendUrl', - )}/auth/reset-password?token=${this.tokensService.signJwt( + )}/auth/link/reset-password?token=${this.tokensService.signJwt( PASSWORD_RESET_TOKEN, { id: emailDetails.user.id }, '30m', @@ -563,7 +563,7 @@ export class AuthService { ), link: `${this.configService.get( 'frontendUrl', - )}/auth/token-login?token=${this.tokensService.signJwt( + )}/auth/link/login%2Ftoken?token=${this.tokensService.signJwt( EMAIL_MFA_TOKEN, { id: user.id }, '30m', @@ -624,7 +624,7 @@ export class AuthService { minutes: 30, link: `${this.configService.get( 'frontendUrl', - )}/auth/reset-password?token=${this.tokensService.signJwt( + )}/auth/link/reset-password?token=${this.tokensService.signJwt( APPROVE_SUBNET_TOKEN, { id }, '30m', diff --git a/src/modules/users/users.service.ts b/src/modules/users/users.service.ts index 8f2bfdad1..d37a6dbed 100644 --- a/src/modules/users/users.service.ts +++ b/src/modules/users/users.service.ts @@ -131,7 +131,7 @@ export class UsersService { minutes, link: `${this.configService.get( '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`,