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

Util getCredentialsOrigin #2793

Merged
merged 3 commits into from
Jan 21, 2025
Merged

Util getCredentialsOrigin #2793

merged 3 commits into from
Jan 21, 2025

Conversation

lmuntaner
Copy link
Collaborator

@lmuntaner lmuntaner commented Jan 21, 2025

Motivation

Make sure that users don't have a bad UX when logging in from different domains. The bad UX comes from having devices registered in different domains. Therefore, we want to avoid that a user can register devices in different domains.

In this PR, a new util is introduced to get the common origin of all user's device.

Changes

  • New util getCredentialsOrigin.
  • Remove DEFAULT_ORIGIN from findWebauthnRpId move it to a constants file.

Tests


🟡 Some screens were changed

@lmuntaner lmuntaner requested review from sea-snake and LXIF January 21, 2025 07:35
@lmuntaner
Copy link
Collaborator Author

@sea-snake @LXIF please review

src/frontend/src/utils/credential-devices.ts Outdated Show resolved Hide resolved
src/showcase/src/constants.ts Outdated Show resolved Hide resolved
@lmuntaner lmuntaner force-pushed the lm-util-get-credentials-origin branch from 3850cbe to 3565ee7 Compare January 21, 2025 11:47
@lmuntaner lmuntaner requested a review from sea-snake January 21, 2025 11:48
@lmuntaner
Copy link
Collaborator Author

@sea-snake ready for another review

@lmuntaner lmuntaner added this pull request to the merge queue Jan 21, 2025
Merged via the queue into main with commit d5d446e Jan 21, 2025
67 checks passed
@lmuntaner lmuntaner deleted the lm-util-get-credentials-origin branch January 21, 2025 12:52
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