Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions plugins/notification/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,12 @@ func (p *Plugin) handleHookEvent(ctx context.Context, event *hook.Event) error {
data[k] = v
}
data["app_name"] = p.config.AppName
// app_url is the application root, available to every template for generic
// "open the app" call-to-action buttons (templates whose own variables don't
// include a specific link, e.g. email-verified, welcome, password-changed).
if p.config.BaseURL != "" {
data["app_url"] = strings.TrimRight(p.config.BaseURL, "/")
}

// The default Herald auth.email-verification template marks verify_url as a
// required variable — it predates the OTP flow, which delivers a 6-digit
Expand Down
7 changes: 6 additions & 1 deletion service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1077,8 +1077,13 @@ func (e *Engine) ResetPassword(ctx context.Context, token, newPassword string) e

e.audit(ctx, bridge.SeverityInfo, bridge.OutcomeSuccess, "reset_password", "user", u.ID.String(), u.ID.String(), pr.AppID.String(), "auth", nil)

// A completed reset means the password changed — emit ActionPasswordChange
// (the "your password was changed" confirmation), NOT ActionPasswordReset.
// ActionPasswordReset is the reset-*requested* event (it sends the "Reset
// your password" link email); emitting it here re-sent that link email
// after the user had already reset their password.
e.hooks.Emit(ctx, &hook.Event{
Action: hook.ActionPasswordReset,
Action: hook.ActionPasswordChange,
Resource: hook.ResourceUser,
ResourceID: u.ID.String(),
ActorID: u.ID.String(),
Expand Down
20 changes: 16 additions & 4 deletions ui/packages/components/src/components/sign-in-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ export interface SignInFormComponentProps {
variant?: AuthCardVariant;
/** Additional CSS class names. */
className?: string;
/**
* Heading shown on the initial sign-in view (email / passwordless steps).
* Defaults to "Sign in". Use it to brand the form, e.g. "Sign in to Acme".
*/
title?: string;
/**
* Subtitle shown under the heading on the initial sign-in view.
* Defaults to "Welcome back. Sign in to your account."
*/
description?: string;
}

/**
Expand All @@ -81,6 +91,8 @@ export function SignInForm({
align,
variant,
className,
title = "Sign in",
description = "Welcome back. Sign in to your account.",
}: SignInFormComponentProps) {
const { signIn, client, resendVerification } = useAuth();
const { config } = useClientConfig();
Expand Down Expand Up @@ -221,8 +233,8 @@ export function SignInForm({
const hasAnyMethod = hasSocial || showPasskey;
return (
<AuthCard
title="Sign in"
description="Welcome back. Sign in to your account."
title={title}
description={description}
logo={logo}
footer={footer}
align={align}
Expand Down Expand Up @@ -320,8 +332,8 @@ export function SignInForm({
if (step === "email") {
return (
<AuthCard
title="Sign in"
description="Welcome back. Sign in to your account."
title={title}
description={description}
logo={logo}
footer={footer}
align={align}
Expand Down
Loading