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

chore: [IOPID-2406] Added handling of errorMessage during login #6361

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Ladirico
Copy link
Contributor

@Ladirico Ladirico commented Nov 4, 2024

Short description

Added handling of errorMessage during login for both SPID and CIE ID authentication.

List of changes proposed in this pull request

  • Implemented parsing of errorMessage parameter from URLs encountered during the authentication flow.
  • Updated handleLoginFailure to utilize and display specific error messages when available, improving user feedback in error scenarios.
  • Unified error-handling logic across SPID and CIE ID flows to ensure consistency.
  • Edited old tests to cover scenarios where specific errorMessage values are present or absent.
  • Change copy about "Security" section in "Settings" sections

Demo

ErrorMessage handling

Local env flow Production env flow
Registrazione.schermo.2024-11-04.alle.17.00.51.mov
Registrazione.schermo.2024-11-05.alle.09.46.24.mov

Change "Security" copy

IT - Settings Main Screen IT - Security Screen EN - Settings Main Screen EN - Security Screen
IT - Settings Main Screen IT - Security Screen EN - Settings Main Screen EN - Security Screen

How to test

Run the application using or local (use this branch) or production environment. If you're running the flow in production environment i suggest to you to use proxyman and mock https://app-backend.io.italia.it/assertionConsumerService API response and change the location value. in the video I am simulating an error 22 but I get the error with the errorMessage because I mocked that response using Proxyman

@Ladirico Ladirico added the IO-A&I IO - Autenticazione e Identità label Nov 4, 2024
@pagopa-github-bot pagopa-github-bot changed the title [IOPID-2406] Added handling of errorMessage during login chore: [IOPID-2406] Added handling of errorMessage during login Nov 4, 2024
@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented Nov 4, 2024

Affected stories

  • ⚙️ IOPID-2406: [APP] Gestione dell’errorMessage durante la login
    subtask of

Generated by 🚫 dangerJS against d67866d

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 13.15789% with 33 lines in your changes missing coverage. Please review.

Project coverage is 46.99%. Comparing base (4f204b4) to head (70bc67e).
Report is 670 commits behind head on master.

Files with missing lines Patch % Lines
ts/screens/authentication/IdpLoginScreen.tsx 0.00% 10 Missing ⚠️
...s/screens/authentication/idpAuthSessionHandler.tsx 0.00% 10 Missing ⚠️
...s/authentication/cie/CieConsentDataUsageScreen.tsx 0.00% 5 Missing ⚠️
...features/cieLogin/components/CieIdLoginWebView.tsx 0.00% 3 Missing ⚠️
ts/utils/login.ts 50.00% 2 Missing and 1 partial ⚠️
ts/screens/authentication/AuthErrorScreen.tsx 0.00% 1 Missing ⚠️
...s/authentication/components/AuthErrorComponent.tsx 66.66% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6361      +/-   ##
==========================================
- Coverage   48.42%   46.99%   -1.43%     
==========================================
  Files        1488     1817     +329     
  Lines       31617    36952    +5335     
  Branches     7669     8801    +1132     
==========================================
+ Hits        15311    17367    +2056     
- Misses      16238    19527    +3289     
+ Partials       68       58      -10     
Files with missing lines Coverage Δ
ts/screens/authentication/AuthErrorScreen.tsx 12.50% <0.00%> (ø)
...s/authentication/components/AuthErrorComponent.tsx 84.61% <66.66%> (ø)
...features/cieLogin/components/CieIdLoginWebView.tsx 13.09% <0.00%> (ø)
ts/utils/login.ts 68.18% <50.00%> (-3.62%) ⬇️
...s/authentication/cie/CieConsentDataUsageScreen.tsx 3.50% <0.00%> (-3.64%) ⬇️
ts/screens/authentication/IdpLoginScreen.tsx 1.86% <0.00%> (-2.14%) ⬇️
...s/screens/authentication/idpAuthSessionHandler.tsx 4.42% <0.00%> (-0.25%) ⬇️

... and 1438 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f620db4...70bc67e. Read the comment docs.

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.

2 participants