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

fix(IT Wallet): [SIW-1795] Problem with SPID Login Using Custom Tab #6409

Draft
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

RiccardoMolinari95
Copy link
Collaborator

@RiccardoMolinari95 RiccardoMolinari95 commented Nov 15, 2024

Warning

Depends on #6455

Short description

This PR addresses the issue encountered by some users when logging in via SPID for PID issuance on ITWallet, specifically related to the opening of the CustomTab.
Unified the authorization flows for SPID, Cie + PIN, and CieID. Previously, SPID and CieID had a unique flow, while Cie + PIN followed two separate flows (startAuthFlow and completeAuthFlow). Replaced the opening of a CustomTab with a WebView for SPID authentication.

List of changes proposed in this pull request

  • Created a new screen ItwSpidIdpLoginScreen to handle the SPID authentication process within a WebView. This screen loads the authUrl generated by startAuthFlow and sends the authRedirectURL back to the state machine when it contains itWalletIssuanceRedirectUri
  • Refactored the XState machine states related to eID issuance for CieID and SPID, aligning them with the existing flow for CIE + PIN
  • Added openUrlAndListenForAuthRedirect, which opens the authUrl in the browser for CieID and provides the authRedirectURL
  • Created a new actor getAuthRedirectUrl used in the CieIDBuildAuthRedirectUrl state of CieID, which utilizes openUrlAndListenForAuthRedirect to complete the authentication

How to test

To test the changes, try obtaining the eID using all three authentication methods (SPID, Cie + PIN, and CieID) and ensure that the eID is successfully obtained in each case. After successfully obtaining the eID, proceed to obtain a credential and ensure that the process completes without issues.

Screen.Recording.2024-11-15.at.11.06.42.mov

@RiccardoMolinari95 RiccardoMolinari95 changed the base branch from master to SIW-1830-wallet-errors-refactor November 26, 2024 10:20
@pagopa-github-bot pagopa-github-bot changed the title [SIW-1795] Problem with SPID Login Using Custom Tab fix(IT Wallet): [SIW-1795] Problem with SPID Login Using Custom Tab Nov 26, 2024
@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented Nov 26, 2024

Affected stories

  • 🐞 SIW-1795: [io-app] Risoluzione login con custom tab Android con reintroduzione webview

Generated by 🚫 dangerJS against 551bbac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants