-
Notifications
You must be signed in to change notification settings - Fork 4
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
Refactoring of the registration, verification, and login processes #75
Merged
WJRobert
merged 72 commits into
QuantozTechnology:main
from
arash817:change-device-verification-logic
Apr 17, 2024
Merged
Refactoring of the registration, verification, and login processes #75
WJRobert
merged 72 commits into
QuantozTechnology:main
from
arash817:change-device-verification-logic
Apr 17, 2024
Conversation
This file contains 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
add @react-native-async-storage/async-storage
* The device verification process has been moved to after the Azure sign up process. * Store the private key and the public key with the oid. * Improve WelcomeScreen by handling new errors.
* Request tracking permission for azure signup. * Check app first install.
install expo-tracking-transparency package
* Implement renew token function. * Change logout function * Change getUserSession function
…andle customer different status
WJRobert
requested changes
Apr 16, 2024
Also please fix the failing front end tests :) |
WJRobert
requested changes
Apr 17, 2024
WJRobert
approved these changes
Apr 17, 2024
raymens
pushed a commit
that referenced
this pull request
Jun 25, 2024
* update package.json add @react-native-async-storage/async-storage * Implement a new logic for device verification * Close the current session before opening the signup page * Change ConfirmDevice page to use the new public key name (with oid) * The getCustomer function shouldn't run if there's no oid or public key * Axios requestInterceptor and responseInterceptorError logic changed * Store oid in secure store and Fix idToken iss compare problem * Implement new sign up process * The device verification process has been moved to after the Azure sign up process. * Store the private key and the public key with the oid. * Improve WelcomeScreen by handling new errors. * Implement page type on WelcomeStack to fix the signup and login process * Change App ready state logic * Request tracking permission for azure signup. * Check app first install. * Update package.json install expo-tracking-transparency package * Refactor azureService functions * Implement renew token function. * Change logout function * Change getUserSession function * Change AzureAuthProvider to add email and phoneNumber * Refactor createCustomer and useCustomer functions * Fix auth related types * Implement AppStateContext to handle the registration process * Fix balances refetch interval * Fix transactions refetch interval * Remove unnecessary code in logout function * Change ConsumerRegistration to set isRegistered on success response * Refactor UserProfile to handle failed requests and retry them * Refactor axios functions * Create functions.ts: Implement all necessary functions * remove expo-constants from App.ts * Add retry option to useAccount query * Add logout functionality to ConfirmDevice screen * Add disabled state to Create account button * Implement retryFetchData function in UserProfile and Withdraw components * Remove error notification in SignIn component * Fix renew function in authService * Remove unnecessary codes from customer context * Remove Sentry integration * Removed unused code from App.tsx * Change error handling in axios.ts * Fix device verification and remove some unused functions * Refactor WelcomeStack * fix checkScreenLockMechanism type issue * Deleted all old verification tests and wrote new ones. * Fix Consumer Registration tests * Remove oid and tokens on fresh install * fix biometric support check function * Implement account removal * Update FullScreenMessage component with background and text color options * Add RemoveAccount menu item * Implement ConsumerRegistration screen input validation * Export QPA_TOKEN_KEY enum in authStorageService to be used in other files * Update customerContext.interface.ts with additional properties and types * Update period value in SecurityCode to 120 seconds * No need to logout on signup * Update CustomerContext to include is_business property in state and handle customer different status * Change getCustomer function to handle error response * Update biometric validation logic and OTP code handling * Fix axios retry on 401 error to handle token refresh * Refactor ConfirmDevice to handle the second device issue * Refactor WelcomeStack to work with new logic * remove useless code on getCustomer func * Removed unused functions * removed console log on biometricValidation catch * delete useDeviceVerification file * remove useDeviceHasScreenLock file * Update package.json: testPathIgnorePatterns added to test script * There are some tests that need to be changed. They were temporarily skipped. * There are some tests that need to be changed. They were temporarily skipped. * Fix some tests for BalanceList, TransactionList, and PaymentRequestsList * remove useBiometricValidation file (unused) * Fix SecureStore key types: SECURE_STORE_KEYS * Fix customer status types: CustomerStateType * Update ci-test in package.json to skip some tests * Remove some comments --------- Co-authored-by: Wayne <[email protected]>
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.
We refactored most of the code in the signup and login process in order to change the logic for device verification and fix current issues. Here are the changes:
"BiometricCheck" | "BiometricError" | "BiometricNone" | "BiometricDone" | "ScreenLockCheck" | "ScreenLockError" | "ScreenLockNone" | "ScreenLockDone" | "SignIn" | "DeviceVerificationCheck" | "DeviceVerificationConflict" | "DeviceVerificationError" | "DeviceVerificationDone" | "AutoLogin" | "RegistrationCompleteForm"