[DO NOT MERGE WIP] Feature: WebAuthn Login#3580
Draft
hajinsuha1 wants to merge 88 commits intodevelopfrom
Draft
Conversation
- Created CreatePasskeyModal component for registering new passkeys with custom nicknames - Added useAccountCreatedToast hook to show success toast with passkey promotion after account creation - Integrated passkey registration flow into auth modal, checkout confirmation, and registration pages - Implemented initial WebAuthn registration API call to /oauth2/webauthn/register/authorize - Added UI elements for passkey nickname input and registration button - Update
- Renamed CreatePasskeyModal component to PasskeyRegistrationModal for clearer naming - Renamed useAccountCreatedToast hook to usePasskeyRegistration to better reflect its purpose - Refactored modal state management to pass props directly instead of wrapping in component - Updated imports and references across auth, registration and checkout confirmation pages - Simplified modal state object returned from usePasskeyRegistration hook - Updated component
- Added two-step passkey registration flow with email verification code - Implemented WebAuthn credential creation using browser's native API - Added base64url encoding/decoding utilities for WebAuthn binary data handling - Created verification code input with auto-submit on 8 digits - Added resend code functionality for verification step - Added state management to handle registration steps and form data - Updated modal UI to show different
- Moved PasskeyRegistrationModal from auth/registration/checkout pages to account page for consistent user experience - Added session storage flag 'newAccountCreated' to track when to show passkey registration prompt - Simplified registration flow by removing duplicate passkey modal instances - Updated auth flows to defer passkey registration until user reaches account page - Removed unused passkey imports from auth-modal, registration,
- Replaced direct sessionStorage calls with utility functions (setSessionJSONItem, getSessionJSONItem, clearSessionJSONItem) - Consolidated new account flag handling across auth modal, registration, checkout, and account pages - Added temporary login trigger for passkey registration testing - Updated all components to use consistent storage approach for newAccountCreated flag
…W-20224220-passkey-in-auth-modal
Collaborator
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
…0224220-passkey-in-auth-modal
…error handling - Integrated finishWebauthnAuthentication to complete the passkey login flow. - Improved error handling and logging for authentication processes. - Added helper functions for base64url encoding/decoding to facilitate credential processing.
Co-authored-by: Jinsu Ha <j.ha@salesforce.com>
…st environment settings
…0224220-passkey-in-auth-modal
* add new usePasskeyLogin hook to be used to initiate passkey login * call usePasskeyLogin from ContactInfo page * ensure merge basket is handled
…-modal Signed-off-by: jeremy-jung1 <140001271+jeremy-jung1@users.noreply.github.com>
…eCloud/pwa-kit into feature/webauthn-login
…d remove obsolete TypeScript ignore comment in Auth class.
…key-in-auth-modal @W-20224220 Passkey login in auth modal and login page
Signed-off-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
* Add passkey login validation to E2E tests * Introduced a new function `validatePasskeyLogin` in `pageHelpers.js` to simulate passkey authentication using a virtual authenticator. * Added 60s timeout prior to running passkey login tests in both desktop and mobile test suites to handle authentication cooldowns.
Signed-off-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
display user-friendly error message for errors during passkey login and registration
…way (#3688) * Refactored passkey login logic in ContactInfo component to only prompt when step is not CONTACT_INFO * Updated AuthModal, Login, ContactInfo to abort passkey login when unmounted * Added abort functionality to usePasskeyLogin hook * Enhanced passkey login handling with abort in
Signed-off-by: Jinsu Ha <91205717+hajinsuha1@users.noreply.github.com>
|
Thanks for the contribution! It looks like @jeremy-jung1 is an internal user so signing the CLA is not required. However, we need to confirm this. |
|
Thanks for the contribution! Before we can merge this, we need @yunakim714 to sign the Salesforce Inc. Contributor License Agreement. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TODO: Need to make a PR to update the
extra-features-e2e-branch(example PR)Description
This branch contains the following PRs:
commerce-sdk-react#3561Types of Changes
Changes
How to Test-Drive This PR
Checklists
General
Accessibility Compliance
You must check off all items in one of the follow two lists:
or...
Localization