Skip to content

feat: update login form to support identity-based authentication#567

Open
rubinaga wants to merge 2 commits intomainfrom
pam-user-login
Open

feat: update login form to support identity-based authentication#567
rubinaga wants to merge 2 commits intomainfrom
pam-user-login

Conversation

@rubinaga
Copy link
Copy Markdown
Contributor

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:

  • Target Branch: dev / main (Beta)
  • Version Impact:
    • Patch (Fix)
    • Minor (Feature)
    • Major (Breaking)

Checklist

  • Changeset Added: I have run pnpm changeset and committed the resulting .md file.
  • UI Verified: I have verified the changes locally.
  • Linting: No linting errors are present (especially in 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.md upon merging to main.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 LoginForm submit logic to send either { identity, password } or { email, password } based on isIdentityAvailable.
  • 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.

Comment thread src/features/auth/components/LoginForm/LoginForm.tsx
Comment thread .changeset/warm-corners-wink.md Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +113 to +115
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 }));
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@rubinaga rubinaga requested a review from a team April 24, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants