Added full path in URL to avoid redirect for deep links in mobile apps
MODIFY
src/async-task/tasks/ImportHelper.ts
src/async-task/tasks/ImportHelper.ts
@@ -164,7 +164,7 @@ export default class ImportHelper {
await UserStorage.saveUserAccountVerification(tenant, user.id, { verificationToken });
// Build account verif email with reset password embeded
const evseDashboardVerifyEmailURL = Utils.buildEvseURL(tenant.subdomain) +
- '/verify-email?VerificationToken=' + verificationToken + '&Email=' + user.email + '&ResetToken=' + resetHash;
+ '/auth/verify-email?VerificationToken=' + verificationToken + '&Email=' + user.email + '&ResetToken=' + resetHash;
// Send activate account link
void NotificationHandler.sendVerificationEmailUserImport(
tenant,

MODIFY
src/server/rest/v1/service/AuthService.ts
src/server/rest/v1/service/AuthService.ts
@@ -210,7 +210,7 @@ export default class AuthService {
if (req.tenant.id !== Constants.DEFAULT_TENANT_ID) {
// Send notification
const evseDashboardVerifyEmailURL = Utils.buildEvseURL(req.tenant.subdomain) +
- '/verify-email?VerificationToken=' + verificationToken + '&Email=' + newUser.email;
+ '/auth/verify-email?VerificationToken=' + verificationToken + '&Email=' + newUser.email;
// Notify (Async)
void NotificationHandler.sendNewRegisteredUser(
req.tenant,
@@ -258,7 +258,7 @@ export default class AuthService {
});
// Send notification
const evseDashboardResetPassURL = Utils.buildEvseURL(req.tenant.subdomain) +
- '/define-password?hash=' + resetHash;
+ '/auth/define-password?hash=' + resetHash;
// Notify
void NotificationHandler.sendRequestPassword(
tenant,
@@ -528,7 +528,7 @@ export default class AuthService {
});
// Send notification
const evseDashboardVerifyEmailURL = Utils.buildEvseURL(req.tenant.subdomain) +
- '/verify-email?VerificationToken=' + verificationToken + '&Email=' +
+ '/auth/verify-email?VerificationToken=' + verificationToken + '&Email=' +
user.email;
// Notify
void NotificationHandler.sendVerificationEmail(

MODIFY
src/server/rest/v1/service/TenantService.ts
src/server/rest/v1/service/TenantService.ts
@@ -281,7 +281,7 @@ export default class TenantService {
await UserStorage.saveUserPassword(tenant, tenantUser.id, { passwordResetHash: resetHash });
// Send activation link
const evseDashboardVerifyEmailURL = Utils.buildEvseURL(filteredRequest.subdomain) +
- '/verify-email?VerificationToken=' + verificationToken + '&Email=' +
+ '/auth/verify-email?VerificationToken=' + verificationToken + '&Email=' +
tenantUser.email + '&ResetToken=' + resetHash;
// Notify
void NotificationHandler.sendNewRegisteredUser(

Added full path in URL to avoid redirect for deep links in mobile apps