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

[IOPID-2719] FastLogin expiration date #467

Merged
merged 4 commits into from
Feb 19, 2025

Conversation

ChrisMattew
Copy link
Collaborator

@ChrisMattew ChrisMattew commented Feb 19, 2025

Important

Depends on this PR

Short description

This PR upgrades the IO_SERVICES_METADATA_VERSION and the IO_SESSION_MANAGER_VERSION, it adds the loginConfig field in the src/payloads/backend.ts file and the expirationDate field in the PublicSession object in order to allow tests in this PR

List of changes proposed in this pull request

  • Upgraded IO_SERVICES_METADATA_VERSION
  • Upgraded IO_SESSION_MANAGER_VERSION
  • Added loginConfig field in the src/payloads/backend.ts file
  • Added the expirationDate field in the PublicSession object

How to test

Follow the instruction in this PR

@ChrisMattew ChrisMattew self-assigned this Feb 19, 2025
@ChrisMattew ChrisMattew added dont-merge ✋🏼 IO-A&I IO - Autenticazione e Identità labels Feb 19, 2025
Copy link

codecov bot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.97%. Comparing base (fc38c3f) to head (0f932a0).
Report is 6 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #467      +/-   ##
==========================================
+ Coverage   63.92%   63.97%   +0.05%     
==========================================
  Files         164      164              
  Lines        5341     5346       +5     
  Branches      723      703      -20     
==========================================
+ Hits         3414     3420       +6     
- Misses       1783     1925     +142     
+ Partials      144        1     -143     
Files with missing lines Coverage Δ
src/payloads/backend.ts 100.00% <ø> (ø)
src/payloads/session.ts 80.00% <100.00%> (+3.33%) ⬆️

... and 34 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 151b9a6...0f932a0. Read the comment docs.

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!

github-merge-queue bot pushed a commit to pagopa/io-app that referenced this pull request Feb 19, 2025
>[!Important]
>Depends on [this
PR](pagopa/io-services-metadata#937)
## Short description
This PR implements the FastLogin notification banner in the messages
section, displayed when the days left until the `expirationDate` are
lower than or equal to the remote `threshold` value

## List of changes proposed in this pull request
- Updated the `content` definitions source url
- Added the `loginPreferences` in order to handle the local persisted
`showSessionExpirationBanner` value
- Added the `LoginExpirationBanner` into the `landingScreenBannerMap`
- Added tests for `isSessionExpirationBannerRenderableSelector` in order
to ensure it works correctly

## Demo

<details>
<summary>Fast Login</summary>

|iOS                     |Android                |
|:---------------|:-----------------|
|<video
src="https://github.com/user-attachments/assets/25161fcb-9bfc-4fd9-986e-76af6cf1808c"></video>|<video
src="https://github.com/user-attachments/assets/5cd88c4c-ac9d-413a-9206-762f7e204d9a"></video>|

</details>

<details>
<summary>Standard Login</summary>

|iOS                     |Android                |
|:---------------|:-----------------|
|<video
src="https://github.com/user-attachments/assets/8c1593dc-a3a7-47ff-8fda-c2255f8053a9"></video>|<video
src="https://github.com/user-attachments/assets/f650d687-44ba-4987-a8f2-33804442cd66"></video>|

</details>

>[!Note]
> For standard login, it is currently not necessary to display the
session expiration banner. However, it can be enabled by setting the
`standardLogin` threshold field in the remote configuration.

## How to test
This feature can be tested in a local environment by running the dev
server from the branch of [this
PR](pagopa/io-dev-api-server#467). This will
allow testing different scenarios by changing the values of
`expirationDate` and `loginConfig` as needed.

As for the production environment, a proxy tool will be required to
manipulate the `expirationDate` field value as needed.

---------

Co-authored-by: mariateresaventura <[email protected]>
@Ladirico Ladirico merged commit cdd0d6f into master Feb 19, 2025
6 checks passed
@Ladirico Ladirico deleted the IOPID-2719-LV-expiration-date branch February 19, 2025 17:06
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