Atomic Angular — Doc interne

Forgot Password

A one-field form that requests a password-reset email — no router, no navigation, safe to drop into a dialog or a wizard step as-is.

ForgotPassword asks for a username and requests a password-reset email for that account. It is the screen behind the "forgot password" link of Sign In, reached through AuthPageComponent on /login?mode=forgotpassword.

Minimal example

A cancel/success pair, no navigation
sample.component.ts
import { Component } from "@angular/core";
import { ForgotPasswordComponent } from "@sinequa/atomic-angular";

@Component({
  selector: "sample-component",
  imports: [ForgotPasswordComponent],
  template: `<forgot-password (cancel)="back()" (success)="onSent()" />`,
})
export class SampleComponent {
  back() {
    /* … */
  }
  onSent() {
    /* … */
  }
}

How it works

This component touches no store and injects no Router — everything it reports goes through success/ cancel, which is what makes it safe to embed anywhere. The reset email is only sent if the account exists and has an email address; the server does not disclose which, and the confirmation message is deliberately identical either way.

no yes ok error submit(resetForm) username filled? mark touched, show the required message api.password.sendResetEmail(username) notify.success + audit Send_Reset_Password_Link emit success errorMsg + notify.error

Recipes

Carrying the username from a previous wizard step

The model is two-way bindable, which is what lets a wizard carry the username from a previous step.

Pre-filling the username
reset-step.component.ts
import { Component, signal } from "@angular/core";
import { ForgotPasswordComponent } from "@sinequa/atomic-angular";

@Component({
  selector: "reset-step",
  imports: [ForgotPasswordComponent],
  template: `<forgot-password [(resetRequest)]="resetRequest" (success)="step.set('sent')" />`,
})
export class ResetStepComponent {
  readonly resetRequest = signal({ username: "john" });
  readonly step = signal("form");
}

Options

Prop

Type

Prop

Type

Pitfalls

What's next

On this page