mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-12 15:03:52 +00:00
use urlTemplate for emails, fix error i18n
This commit is contained in:
@@ -492,16 +492,24 @@ export function createUser(
|
||||
* @param userId the id of the user where the email should be set
|
||||
* @returns the newly set email
|
||||
*/
|
||||
export async function passwordReset(userId: string) {
|
||||
export async function passwordReset(userId: string, host: string | null) {
|
||||
return userService.passwordReset(
|
||||
{
|
||||
userId,
|
||||
medium: {
|
||||
case: "sendLink",
|
||||
value: {
|
||||
notificationType: NotificationType.Email,
|
||||
},
|
||||
},
|
||||
medium: host
|
||||
? {
|
||||
case: "sendLink",
|
||||
value: {
|
||||
notificationType: NotificationType.Email,
|
||||
urlTemplate: `https://${host}/password/set?code={{.Code}}&userId={{.UserID}}&organization={{.OrgID}}`,
|
||||
},
|
||||
}
|
||||
: {
|
||||
case: "sendLink",
|
||||
value: {
|
||||
notificationType: NotificationType.Email,
|
||||
},
|
||||
},
|
||||
},
|
||||
{},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user