Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

story: token expiry #563

Merged
merged 4 commits into from
Jul 6, 2021
Merged

story: token expiry #563

merged 4 commits into from
Jul 6, 2021

Conversation

SanketD92
Copy link
Contributor

@SanketD92 SanketD92 commented Jul 2, 2021

Issue #, if available:
GALI-969

Description of changes:
This is the short-term fix for the ID token expiration bug reported by our customers. Currently the access tokens being generated (by Cognito or otherwise) have an expiration time of 60min, while the default inactivity-warning message has a threshold of 30min. This bug is reported to be independent of inactivity.

This PR adds a ForceLogout component keeping track of user's JWT token expiration and auto logout.

Checklist:

  • Have you successfully deployed to an AWS account with your changes?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully tested with your changes locally?

AS review ticket id:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@SanketD92 SanketD92 requested review from hatimkhan and nguyen102 July 2, 2021 13:45
@SanketD92 SanketD92 requested a review from a team as a code owner July 2, 2021 13:45
@github-actions github-actions bot added the size/m label Jul 2, 2021
@codecov
Copy link

codecov bot commented Jul 2, 2021

Codecov Report

Merging #563 (f57fecc) into develop (46e26af) will increase coverage by 1.25%.
The diff coverage is n/a.

❗ Current head f57fecc differs from pull request most recent head f3652ea. Consider uploading reports for the commit f3652ea to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #563      +/-   ##
===========================================
+ Coverage    49.04%   50.29%   +1.25%     
===========================================
  Files          243      231      -12     
  Lines        12503    11770     -733     
  Branches      2014     1855     -159     
===========================================
- Hits          6132     5920     -212     
+ Misses        5564     5146     -418     
+ Partials       807      704     -103     
Impacted Files Coverage Δ
src/helpers/api.js 0.00% <0.00%> (-0.97%) ⬇️
src/helpers/settings.js 100.00% <0.00%> (ø)
src/helpers/utils.js
...thentication/AuthenticationProviderPublicConfig.js
src/parts/users/AddUser.js
src/helpers/notification.js
src/models/authentication/Authentication.js
src/helpers/errors.js
...cation/AuthenticationProviderPublicConfigsStore.js
src/models/forms/AddUserForm.js
... and 6 more

Continue to review full report at Codecov.

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

nguyen102
nguyen102 previously approved these changes Jul 2, 2021
@SanketD92 SanketD92 merged commit 9243d75 into develop Jul 6, 2021
@SanketD92 SanketD92 deleted the session-expiry branch July 6, 2021 13:12
jxuamazon pushed a commit to jxuamazon/service-workbench-on-aws that referenced this pull request Feb 15, 2022
* story: force logout component

* chore: Trigger Build

* fix: add flag for UI component test

* fix: adding afterall logic for force-logout test
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants