mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-13 19:56:40 +00:00
fix invite resend
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
"use server";
|
"use server";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
createInviteCode,
|
|
||||||
getLoginSettings,
|
getLoginSettings,
|
||||||
getSession,
|
getSession,
|
||||||
getUserByID,
|
getUserByID,
|
||||||
listAuthenticationMethodTypes,
|
listAuthenticationMethodTypes,
|
||||||
|
resendInviteCode,
|
||||||
verifyEmail,
|
verifyEmail,
|
||||||
verifyInviteCode,
|
verifyInviteCode,
|
||||||
verifyTOTPRegistration,
|
verifyTOTPRegistration,
|
||||||
@@ -275,14 +275,10 @@ export async function resendVerification(command: resendVerifyEmailCommand) {
|
|||||||
|
|
||||||
const basePath = process.env.NEXT_PUBLIC_BASE_PATH ?? "";
|
const basePath = process.env.NEXT_PUBLIC_BASE_PATH ?? "";
|
||||||
|
|
||||||
// create a new invite whenever the resend is called
|
|
||||||
return command.isInvite
|
return command.isInvite
|
||||||
? createInviteCode({
|
? resendInviteCode({
|
||||||
serviceUrl,
|
serviceUrl,
|
||||||
userId: command.userId,
|
userId: command.userId,
|
||||||
urlTemplate:
|
|
||||||
`${host.includes("localhost") ? "http://" : "https://"}${host}${basePath}/verify?code={{.Code}}&userId={{.UserID}}&organization={{.OrgID}}&invite=true` +
|
|
||||||
(command.requestId ? `&requestId=${command.requestId}` : ""),
|
|
||||||
}) //resendInviteCode({ serviceUrl, userId: command.userId })
|
}) //resendInviteCode({ serviceUrl, userId: command.userId })
|
||||||
: sendEmailCode({
|
: sendEmailCode({
|
||||||
userId: command.userId,
|
userId: command.userId,
|
||||||
|
Reference in New Issue
Block a user