feat: update login form to support identity-based authentication#567
feat: update login form to support identity-based authentication#567
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the authentication UI to support identity-based (PAM) login by sending an identity field (instead of email) when the identity-based method is available.
Changes:
- Update
LoginFormsubmit logic to send either{ identity, password }or{ email, password }based onisIdentityAvailable. - Add a dedicated unit test to verify the PAM/identity request payload.
- Widen the login request type to support both payload shapes.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/features/auth/components/LoginForm/LoginForm.tsx |
Conditionally maps the form input to email vs identity in the login request. |
src/features/auth/components/LoginForm/LoginForm.test.tsx |
Adds coverage for the identity-based login request payload. |
src/features/auth/api/types.ts |
Updates LoginRequestParams to a union supporting email or identity. |
.changeset/warm-corners-wink.md |
Adds a patch changeset describing the PAM login fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fa1d32e to
36b8023
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| await userEvent.type(screen.getByTestId("identifier"), "john"); | ||
| await userEvent.type(screen.getByTestId("password"), user.password); | ||
| await userEvent.click(screen.getByRole("button", { name: /sign in/i })); |
There was a problem hiding this comment.
Most tests in the repo use a userEvent.setup() instance rather than calling userEvent.type/click directly (e.g. src/features/auth/components/consent-banner/ConsentBannerModal.test.tsx:9). For consistency and to avoid subtle async/flakiness issues with the global userEvent, consider switching this suite to const user = userEvent.setup() and using that instance for interactions.
Summary
This handles Jira tickets:
Ticket 4313
Ticket 5332
Release Impact
According to the Landscape Server Release Cycle, this change will target the following release cycle:
dev/main(Beta)Checklist
pnpm changesetand committed the resulting.mdfile.scripts/).Versioning Reminder
Important
This repository now uses CalVer ($YY.0M.Point.Patch$ ).
Please ensure your changeset description is clear, as it will be automatically added to the
CHANGELOG.mdupon merging tomain.