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-2051] Add logic to refresh session after 2 minutes of background #6082

Merged
merged 11 commits into from
Aug 2, 2024

Conversation

Ladirico
Copy link
Contributor

@Ladirico Ladirico commented Jul 31, 2024

List of changes proposed in this pull request

  • Add logic to refresh session token after 2 minutes of foreground
  • Edit some copy
  • Delete logic to hide switch to enabled/disabled the feature of session refresh

Demo

Note

in order to speed up the testing process I replaced the backgroundActivityTimeout field with 10 so that the functionality is activated after 10 seconds of background and not after 2 minutes

Flow with dev-server Payments Flow with dev-server Flow in production
Example.Local.Session.Refresh.mov
Example.Local.Payment.Session.Refresh.mov
Example.Production.Session.Refresh.mov

How to test

NB: in order to speed up the testing process at this line you can replace the backgroundActivityTimeout const with '10' so that the functionality is activated after 10 seconds of background and not after 2 minutes

Run the application and put the application in the background for at least 2 minutes. When you put it back in foreground the application will be shown the screen to identify you and the token will be refreshed

@pagopa-github-bot pagopa-github-bot changed the title [IOPID-2051] Add logic to refresh session after 2 minutes of foreground chore: [IOPID-2051] Add logic to refresh session after 2 minutes of foreground Jul 31, 2024
@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented Jul 31, 2024

Affected stories

  • ⚙️ IOPID-2051: [APP] Implementazione funzionalità
    subtask of
    • 🌟 IOPID-1431: [APP] Rinnovo sessione al foreground dell'APP

Generated by 🚫 dangerJS against 762f8e5

Copy link

codecov bot commented Jul 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.78%. Comparing base (4f204b4) to head (762f8e5).
Report is 389 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6082      +/-   ##
==========================================
- Coverage   48.42%   47.78%   -0.65%     
==========================================
  Files        1488     1714     +226     
  Lines       31617    34372    +2755     
  Branches     7669     8243     +574     
==========================================
+ Hits        15311    16423    +1112     
- Misses      16238    17888    +1650     
+ Partials       68       61       -7     
Files Coverage Δ
ts/screens/profile/DeveloperModeSection.tsx 25.53% <ø> (+21.05%) ⬆️

... and 1160 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 899266b...762f8e5. Read the comment docs.

@Ladirico Ladirico marked this pull request as ready for review August 1, 2024 08:37
@Ladirico Ladirico requested review from thisisjp and a team as code owners August 1, 2024 08:37
@Ladirico Ladirico changed the title chore: [IOPID-2051] Add logic to refresh session after 2 minutes of foreground chore: [IOPID-2051] Add logic to refresh session after 2 minutes of background Aug 1, 2024
Copy link
Member

@shadowsheep1 shadowsheep1 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 49d1d9e into master Aug 2, 2024
13 checks passed
@Ladirico Ladirico deleted the IOPID-2051-add-refresh-logic branch August 2, 2024 12:55
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.

4 participants