Skip to content

Commit f3b9c15

Browse files
authored
fix: edited qs in organization invite link (#410)
1 parent 366e6cf commit f3b9c15

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/utils/challenges/email/generate.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,15 @@ function generate(email, type, ctx = {}, opts = {}, nodemailer = {}) {
4040
context.link = generateLink(server, paths[type]);
4141
break;
4242
case USERS_ACTION_ORGANIZATION_INVITE:
43-
case USERS_ACTION_ORGANIZATION_REGISTER:
4443
// generate secret
4544
context.qs = `?q=${context.token.secret}&organizationId=${ctx.organizationId}&username=${ctx.email}`;
4645
context.link = generateLink(server, paths[type]);
4746
break;
47+
case USERS_ACTION_ORGANIZATION_REGISTER:
48+
// generate secret
49+
context.qs = `?password=${ctx.password}&login=${ctx.email}`;
50+
context.link = generateLink(server, paths[type]);
51+
break;
4852

4953
case USERS_ACTION_PASSWORD:
5054
case USERS_ACTION_REGISTER:

0 commit comments

Comments
 (0)