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-2615] Add specific action to clear the session state #6615

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

Conversation

shadowsheep1
Copy link
Member

@shadowsheep1 shadowsheep1 commented Jan 20, 2025

Short description

This PR introduces a new action to clear the session state during the first app installation. This resolves the issue of session information persisting across multiple app installations on the same iOS device.

The app now behaves correctly because a lollipop check triggers a sessionInvalid action if the check fails.

Demo 🎦

Before.mov
After.mov
Mixpanel
clear-current-sessoin-mp.mov

List of changes proposed in this pull request

  • Added a new clearCurrentSession action.
  • Ensured the clearCurrentSession action is dispatched during the first app installation to remove any residual session state from a previous installation.

How to test

  1. Run the application on both Android and iOS devices.
  2. Perform a successful login.
  3. Without logging out, remove the app from the device.
  4. Reinstall the app and confirm that you land on the LandingPage without a sessionInvalid action being dispatched.

@shadowsheep1 shadowsheep1 added the IO-A&I IO - Autenticazione e Identità label Jan 20, 2025
@shadowsheep1 shadowsheep1 self-assigned this Jan 20, 2025
Copy link
Contributor

github-actions bot commented Jan 20, 2025

Jira Pull Request Link

This Pull Request refers to the following Jira issue IOPID-2615

Copy link

codecov bot commented Jan 20, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 49.93%. Comparing base (d72920c) to head (98f36db).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
ts/sagas/installation.ts 0.00% 1 Missing ⚠️
ts/store/reducers/authentication.ts 50.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6615   +/-   ##
=======================================
  Coverage   49.93%   49.93%           
=======================================
  Files        1567     1567           
  Lines       32462    32465    +3     
  Branches     7310     7312    +2     
=======================================
+ Hits        16210    16212    +2     
- Misses      16213    16215    +2     
+ Partials       39       38    -1     
Files with missing lines Coverage Δ
ts/store/actions/authentication.ts 100.00% <100.00%> (ø)
ts/sagas/installation.ts 0.00% <0.00%> (ø)
ts/store/reducers/authentication.ts 66.29% <50.00%> (-0.38%) ⬇️

... and 1 file 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 6b1bd84...98f36db. 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!

@Ladirico
Copy link
Contributor

Ladirico commented Jan 22, 2025

Just a note: you could also add the ‘legal-review-needed’ label to make it clearer why there is the label ‘dont merge’.

@shadowsheep1 shadowsheep1 added the legal-review-needed ⚖️ ⛔ this PR is under legal check. label Jan 22, 2025
Copy link
Collaborator

@ChrisMattew ChrisMattew left a comment

Choose a reason for hiding this comment

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

LGTM!! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dont-merge ✋ IO-A&I IO - Autenticazione e Identità legal-review-needed ⚖️ ⛔ this PR is under legal check.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants