Skip to content
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

Change findWebAuthnRpId signature and return #2744

Merged
merged 1 commit into from
Dec 12, 2024
Merged

Conversation

lmuntaner
Copy link
Collaborator

@lmuntaner lmuntaner commented Dec 11, 2024

Motivation

Support multiple domains for passkeys.

Improve the helper findWebAuthnRpId:

Changes

Changes to findWebAuthnRpId:

  • Return the hostname which is what is needed as RP ID, not the full origin.
  • Instead of expecting a list of domains with two parts, it expects full origins. It's more maintenable and we can differentiate between beta.identity.ic0.app and https://fgte5-ciaaa-aaaad-aaatq-cai.ic0.app.
  • Third parameter relatedDomains is mandatory.
  • Returns undefined when no related domains. This will be the case for local development and II deployed individually to mainnet.
  • Complementary helper relatedDomains, which returns the set of domains related to the current one.

Tests

  • Change tests to new return type and parameters.

🟡 Some screens were changed

@lmuntaner lmuntaner marked this pull request as ready for review December 11, 2024 13:13
@lmuntaner lmuntaner requested review from sea-snake and LXIF December 11, 2024 13:13
@lmuntaner
Copy link
Collaborator Author

@LXIF @sea-snake please review

Copy link
Contributor

@LXIF LXIF left a comment

Choose a reason for hiding this comment

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

LGTM, tests also check out locally

@lmuntaner lmuntaner added this pull request to the merge queue Dec 12, 2024
Merged via the queue into main with commit fa5bf21 Dec 12, 2024
67 checks passed
@lmuntaner lmuntaner deleted the lm-change-find-rp-id branch December 12, 2024 10:12
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