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

feat: [IOPID-689] Email validation at startup #5264

Merged
merged 54 commits into from
Dec 4, 2023
Merged

Conversation

shadowsheep1
Copy link
Member

@shadowsheep1 shadowsheep1 commented Nov 27, 2023

⚠️ Depends on #5206 ⚠️

Short description

This PR blocks the user if their email is not verified or is already taken, forcing them to validate or change it. The flow is described in this Figma.

List of changes proposed in this pull request

  • The two modal ValidateEmailModal and EmailAlreadyUsedModal has been changed to their sibling screen component ValidateEmailScreen and EmailAlreadyTakenScreen to use the navigation capabilities.
  • A new redux state has been added to EmailValidationState to know if we are landing to EmailInsertScreen from the standard flow or because the user has been block during the startup process.

How to test

Enable the new CDU flow and using the io-dev-api-server try to:

  • Enter the app as a new user (firstOnboardig: true) and see that you are blocked until you have validated your email. Even if you reload the app.
  • Change your email in the profile section and see that you are blocked until you have validated your email, even if you reload the app.
  • Try to invalidate the email and set it as "already taken", and restart the app. You should see that you are blocked until you have changed and successfully validated the new email, even if you reload the app.

At app startup if isEmailValidated=true the user can continue without problems, otherwise if isEmailValidated=false the user sees ValidateEmailScreen or EmailAlreadyTakenScreen based on the value of isEmailAlreadyTaken.

Details

email-validation-process.-.SD.480p.mov

Ladirico and others added 29 commits November 2, 2023 17:41
Co-authored-by: Alice Azzolini <[email protected]>
Co-authored-by: Alice Azzolini <[email protected]>
Co-authored-by: Alice Azzolini <[email protected]>
## Short description
This pr adds the logic that allows the app not to show the biometric
activation request if it has already been activated in a previous login
and adds, in the case of FACE_ID, the prompt requesting permissions upon
activation.

## List of changes proposed in this pull request
-
ts/sagas/startup/onboarding/biometric/checkAcknowledgedFingerprintSaga.ts:
added check to see if it had been activated in the last login.
- [ts/screens/onboarding/biometric&securityChecks/FingerprintScreen.tsx
, ts/screens/profile/SecurityScreen.tsx] : added permission request
prompt in case of faceid.
- ts/store/reducers/index.ts: biometric preference persisted to get it
also after the end of a session.
- ts/store/reducers/onboarding.ts: added reset of biometric control also
after session expired.
- ts/store/reducers/persistedPreferences.ts: added cross session
control.
- ts/utils/biometrics.ts: added function that handles the biometric
activation.

## How to test
With a new installation, try activating biometrics during onboarding:
- If the biometric is not FaceID, it should activate (or not) the
feature without prompting.
- If the biometric is FaceID, when the active button is pressed, it
should present the request for permissions:
- If you give permissions and the authentication fails, it should not
proceed.
- If you give permissions and the authentication is successful, it
should proceed and enable the feature.
- If you don't give permissions, it should proceed and not activate the
feature.
    
After logout or session expired, if the biometric has been activated
during last session, it should not ask you for activation again after
login, unless this is done with a different account than the previous
one.

---------

Co-authored-by: Fabio Bombardi <[email protected]>
Co-authored-by: Cristiano Tofani <[email protected]>
…ils screen (#5209)

## Short description
This PR fixes the ID Pay initiative rules info bottom sheet height for
shorter contents.



https://github.com/pagopa/io-app/assets/6160324/7ffc63cf-82d8-4349-a55a-651157537887


## List of changes proposed in this pull request
-
[ts/features/idpay/details/components/InitiativeRulesInfoBox.tsx](https://github.com/pagopa/io-app/compare/IOBP-361-fix-idpay-rules-bottom-sheet?expand=1#diff-aec7df12aad70c4276336c3813019b4655fac37dc09eb456b93208f7c6b8b302):
increased bottom padding to `170` for the rules bottom sheet
-
[ts/features/idpay/details/components/BeneficiaryDetailsContent.tsx](https://github.com/pagopa/io-app/compare/IOBP-361-fix-idpay-rules-bottom-sheet?expand=1#diff-763f13f0b9f72e4763aa758664939937121a62cc637c86ff29bfe6f41ab7d56c):
component props refactoring

## How to test
Navigate to the ID Pay initiative details screen and check that the
rules bottom sheet is correctly displayed.

Co-authored-by: Alessandro Izzo <[email protected]>
Copy link
Contributor

@Ladirico Ladirico left a comment

Choose a reason for hiding this comment

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

LGTM!

@Ladirico Ladirico merged commit 01e0992 into master Dec 4, 2023
5 checks passed
@Ladirico Ladirico deleted the IOPID-689-check-email branch December 4, 2023 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO-A&I IO - Autenticazione e Identità
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants