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

feat(EMS-1027): no pdf - account sign in, creation - unverified email enhancements #2540

Merged
merged 14 commits into from
Jun 6, 2024

Conversation

ttbarnes
Copy link
Contributor

@ttbarnes ttbarnes commented Jun 5, 2024

Introduction ✏️

This PR updates the account creation and sign in processes so that:

  • If an account created, is unverified and a user submits the "create account" form with valid credentials a "confirm/verify email" email is sent.
  • If an account created, is unverified and a user submits the "sign in" form with the valid credentials, a "confirm/verify email" email is sent.
  • If a user successfully signs into their account, mark the account's isInactive status flag as false.

Resolution ✔️

  • Update completeAndSubmitCreateAccountForm cypress command to accept a custom PASSWORD value.
  • Update error messages content strings to have:
    • ACCOUNT_ALREADY_EXISTS
    • ACCOUNT_ALREADY_EXISTS_INCORRECT
  • Create a new E2E helper function, createDateOneMonthInThePast.
  • Create E2E tests for submitting the "create an account" form with existing account data, with:
    • An unverified account, invalid password.
    • An unverified account, valid password.
    • A verified account, invalid password.
    • A verified account, valid password.
  • Create E2E tests for submitting the "sign in" form with existing account data, with:
    • An expired verification token.
    • An expired verification token, account is marked as inactive.
    • An unverified account, no expired verification token.
  • Rename API accountChecks helper function to accountSignInChecks.
  • Update accountSignInChecks to not check for verification token expiry. Instead, it now simply checks if an account is verified or not.
  • Update the "create an account" GraphQL resolver to:
    • Not return success=false if an account already exists.
    • Check if the provided variables have valid credentials that match an existing account. If so and if the account is unverified, call confirmEmailAddressEmail.send.
    • Conditionally return some new flags for UI consumption: alreadyExists, isVerified.
  • Update generateOTPAndUpdateAccount API helper to always mark an account's isInActive flag as false.
  • Update the UI's YOUR_DETAILS POST controller to conditionally render different validation errors, depending on if the account is verified or not.
  • Create/tweak YOUR_DETAILS validation rules:
    • accountAlreadyExistsAlreadyVerifiedValidation
    • accountAlreadyExistsInvalidPasswordValidation

Miscellaneous ➕

  • Create new getAccountStatusById helper function.
  • Documentation, test description improvements.
  • Various logging improvements.
  • Update Keystone Context param documentation.

@ttbarnes ttbarnes added enhancement New feature or request feature New functionality tech Technical debt/improvements security chore Chore labels Jun 5, 2024
@ttbarnes ttbarnes self-assigned this Jun 5, 2024
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes requested a deployment to qa June 6, 2024 11:40 — with GitHub Actions Abandoned
@ttbarnes ttbarnes merged commit e85b2f8 into main-application-no-pdf Jun 6, 2024
161 checks passed
@ttbarnes ttbarnes deleted the feat/EMS-1027 branch June 6, 2024 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Chore documentation Improvements or additions to documentation enhancement New feature or request feature New functionality security tech Technical debt/improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants