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

Enable PIN registration with query param #2711

Merged
merged 6 commits into from
Nov 27, 2024
Merged

Conversation

lmuntaner
Copy link
Collaborator

@lmuntaner lmuntaner commented Nov 27, 2024

Motivation

In the PR where we deprecated registering with PIN we disabled the e2e tests to login (and register) with PIN.

However, current PIN users can still login with with the PIN and will continue to do so for a while.

Therefore, to keep the e2e coverage we had before, we want to reintroduce the e2e tests that login with the PIN. For that, we also need to reintroduce registering with PIN. We use a query param enablePin to enable registering with a PIN.

Changes

Tests

  • Change the URL used for PIN tests to add the needed query param to register with PIN.

🟢 Some screens were added
🟡 Some screens were changed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The changes in this PR are mainly reverting #2687

};
} else {
const identity = savePasskeyResult;
// TODO: Return something meaningful if getting the passkey identity fails
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the only new line that was not just reverted. Because the view can return undefined.

This is in the current code as well. The way this error was handled before was to never resolve the promise and show a toast error.

export const savePasskeyOrPin = async (): Promise<
IIWebAuthnIdentity | undefined
> => {
export const savePasskeyOrPin = async ({
Copy link
Collaborator Author

@lmuntaner lmuntaner Nov 27, 2024

Choose a reason for hiding this comment

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

This is reverted to the old logic if pinAllowed is true and skip to render the page if not enabled.

@@ -123,32 +117,11 @@ test.skip("Should not prompt for PIN after deleting temp key", async () => {
}, APPLE_USER_AGENT);
}, 300_000);

test.skip("Log into client application using PIN registration flow", async () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This won't be enabled in the foreseeable future.

@lmuntaner lmuntaner requested a review from sea-snake November 27, 2024 13:32
@lmuntaner lmuntaner marked this pull request as ready for review November 27, 2024 13:32
@lmuntaner lmuntaner requested a review from a team as a code owner November 27, 2024 13:32
@lmuntaner
Copy link
Collaborator Author

@sea-snake please review

@lmuntaner lmuntaner added this pull request to the merge queue Nov 27, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 27, 2024
@lmuntaner lmuntaner added this pull request to the merge queue Nov 27, 2024
github-merge-queue bot pushed a commit that referenced this pull request Nov 27, 2024
* Reintroduce PIN registration with query param

* Enable PIN e2e tests

* Fix tests

* Use variable for query param in e2e test

* Fix e2e test

* Remove console.log
Merged via the queue into main with commit 6000f20 Nov 27, 2024
67 checks passed
@lmuntaner lmuntaner deleted the lm-enable-pin-login-e2e branch November 27, 2024 14:48
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