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

OKTA-826614 add grace period support for v2 & v3 #3769

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

Conversation

TiffanyNg-okta
Copy link
Contributor

@TiffanyNg-okta TiffanyNg-okta commented Dec 30, 2024

Description:

  • Figma: https://www.figma.com/design/lOOqLOMOii5l6lIbYCvUKz/Authenticator-enrollment-campaigns?node-id=44-2739&t=e0Tod2vF005BrOtc-4
  • https://oktawiki.atlassian.net/wiki/spaces/eng/pages/3147727639/SIW+for+Authenticator+Enrollment+Grace+Period
  • Adds grace period support for v2 & v3
  • Sorts authenticators object into different lists depending on combination of skip remediation + valid grace period field
  • If required authenticators are being returned, we sort them into Required Now or Required Soon list
  • Required Soon authenticators will display grace period elements that show the exact grace period date + time (in user locale and time zone) along with a relative time statement i.e. Required in {x} days or Required today
  • If all the required authenticators have a valid grace period + skip remediation, we show a Remind me later button (backend will handle how this button redirects to optional authenticators)
  • Optional authenticators screen should remain the same
  • Re-use device assurance's formatDateToDeviceAssuranceGracePeriodExpiryLocaleString to display exact grace period date + time
  • For v2, we add a new container (AuthenticatorEnrollOptionsContainer) to house the different lists as we can now have more than one list shown on the view
  • V3 was able to make use of existing functionality so no new files we needed outside of some refactoring.
  • We are opting to NOT round down to nearest hour like Device Assurance Grace Period

PR Checklist

Issue:

Reviewers:

Screenshot/Video:

V2 screenshots:
Screenshot 2025-01-02 at 10 25 52 AM

Screenshot 2025-01-07 at 10 34 00 AM Screenshot 2025-01-07 at 10 47 42 AM Screenshot 2025-01-02 at 10 30 23 AM

V3 screenshots:
Screenshot 2025-01-07 at 1 48 30 PM

Screenshot 2025-01-07 at 1 47 06 PM

Screenshot 2025-01-07 at 1 45 43 PM

Screenshot 2025-01-07 at 2 05 40 PM

Downstream Monolith Build:

@TiffanyNg-okta TiffanyNg-okta changed the title OKTA-826614 add grace period support for v2 OKTA-826614 add grace period support for v2 & v3 Jan 7, 2025
Copy link
Contributor

@shuowu-okta shuowu-okta left a comment

Choose a reason for hiding this comment

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

LGTM! Ready for demo cell / e2e testing

* @param {Integer} epoch2 epoch timestamp in milliseconds as an integer
* @return {Integer} The number of days between the two epoch timestamps
*/
calculateDaysBetweenEpochTimestamps(epoch1, epoch2) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add unit test for this util function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@TiffanyNg-okta TiffanyNg-okta force-pushed the tng-okta-826614 branch 3 times, most recently from 2548bb7 to 37d8a72 Compare January 8, 2025 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants