8000 Add a user-defined passkey name to the passkey data by kelvin-chappell · Pull Request #566 · guardian/janus-app · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add a user-defined passkey name to the passkey data #566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 12, 2025

Conversation

kelvin-chappell
Copy link
Member

What is the purpose of this change?

This adds a mechanism to the frontend to set a passkey name during the registration process. The name is added to the data stored in the Dynamo passkeys table. This change also uses the names to list passkeys on the user account page.

What is the value of this change and how do we measure success?

Users are allowed up to two passkeys so this change enables them to identify the passkeys they have already registered. In the future it will allow them to choose which one to delete if they want to.

Co-authored-by: @tjsilver

@kelvin-chappell kelvin-chappell requested review from a team and Copilot May 8, 2025 12:22
Copy link
@Copilot 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

This PR adds the ability for users to assign a custom name to their passkeys during registration and uses that name to list passkeys on the account page.

  • Introduces a new modal prompt (using Materialize CSS) to retrieve the passkey name from the user.
  • Wraps registration and authentication flows in try-catch blocks for improved error handling.
  • Refactors form submission by dynamically creating a form with the necessary fields, including the passkey name.
Files not reviewed (8)
  • app/aws/PasskeyChallengeDB.scala: Language not supported
  • app/aws/PasskeyDB.scala: Language not supported
  • app/controllers/PasskeyAuthFilter.scala: Language not supported
  • app/controllers/PasskeyController.scala: Language not supported
  • app/logic/Passkey.scala: Language not supported
  • app/models/models.scala: Language not supported
  • app/views/userAccount.scala.html: Language not supported
  • test/logic/PasskeyTest.scala: Language not supported

8000

// Clear error when typing
input.addEventListener('input', () => {
if (input.value.trim()) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Needs more input validation - eg restrict to alphanumeric etc.

Copy link
Contributor
@tjsilver tjsilver left a comment

Choose a reason for hiding this comment

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

Tested locally and works as expected. We can add the input validation in a separate PR.

8000
@kelvin-chappell kelvin-chappell enabled auto-merge (squash) May 12, 2025 12:28
@kelvin-chappell kelvin-chappell merged commit e2f855a into main May 12, 2025
6 checks passed
@kelvin-chappell kelvin-chappell deleted the ts/kc/passkey-data branch May 12, 2025 12:29
@kelvin-chappell
Copy link
Member Author

Can successfully register a new passkey in Prod and see its name:

image

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
0