Skip to content

Commit

Permalink
refactor: enhance IAM usage with actions (#256)
Browse files Browse the repository at this point in the history
* refactor: cleanup

* chore: update app dependencies

* refactor(register): add refine step for password validation

* feat: add utility for handling query params

* refactor(ory): use native flows (wip)

- add `confirmation` screen for starting verification manually

* fix: remove return

* refactor: enhance error handling

* fix: remove `console.log`

* chore: update app dependencies

* refactor: turn static class method into function

* refactor: validate luhn on schema

* fix: provide language to recaptcha

* refactor(identification): enhance error handling (wip)

* fix: emotion undefined styles

* fix: add action base response

* chore: remove empty spaces

* refactor: expand captured error scope

* refactor: expand captured error scope

* fix: execution order

* fix: typo

* style: limit snack size

* refactor: remove impossible case

* refactor: localize error messages

* refactor: remove unused vars

* fix: handle luhn valid incorrect `cedulas`

* refactor: improve action state types

* refactor: use secure cookies in production only

- setting secure cookies in safari from a non https connection fails

* fix: acces to undefined (safari)

* refactor: do not try reduce falsy values

* fix: error on landscape orientation on mobile

* chore: update app dependencies

* feat: reset liveness after 5 minutes of initialized its component

* chore: update app dependencies

* chore: update app dependencies

* chore: update app dependencies

* feat(css, ux): improve responsiveness and adjust modal app bar position

- Updated `.liveness_container` to be more responsive with a max-width of 700px, padding adjustments, and additional media query for smaller screen heights.
- Changed `AppBar` position in `LivenessModal` from `absolute` to `relative` for better layout control.

* refactor: make liveness timeout configurable

* fix: provide default empty flow

* fix: require registered unverified accounts to resend a code to activate account

* chore: update app dependencies

* refactor: enhance sentry exchange

* bump: version `v1.5.0`

* chore: update app dependencies

* style(liveness): fix positioning

Co-authored-by: José Eduardo Álvarez Lerebours <[email protected]>

* feat(register): add flow parameter to registration process state

* style(global): convert liveness mobile margin from `px` to `rem`

Co-authored-by: José Eduardo Álvarez Lerebours <[email protected]>

* fix: use correct link and name for `Soy Yo RD`

* feat: enable `Soy yo RD` link

* chore: update app dependencies

* chore: update app dependencies

* chore: update `postcss`

* feat: make input immutable

* ci: add variables to example

* fix: send activation code if logged from an inactive account

- this is typically hadled by `iam` but jutst in case

* chore: update app dependencies

* chore: update app dependencies

---------

Co-authored-by: je1999 <[email protected]>
Co-authored-by: José Eduardo Álvarez Lerebours <[email protected]>
  • Loading branch information
3 people authored Sep 5, 2024
1 parent b1ba6cc commit a5ae2ce
Show file tree
Hide file tree
Showing 46 changed files with 2,891 additions and 3,585 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ NEXT_PUBLIC_SENTRY_DSN=
SENTRY_ORG=
SENTRY_PROJECT=
SENTRY_AUTH_TOKEN=
NEXT_PUBLIC_LIVENESS_TIMEOUT_SECONDS=300
BACKOFFICE_API_URL=
BACKOFFICE_API_KEY=
1 change: 1 addition & 0 deletions .github/workflows/sub-build-push-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
push: true
build-args: |
NEXT_PUBLIC_LIVENESS_TIMEOUT_SECONDS=${{ vars.NEXT_PUBLIC_LIVENESS_TIMEOUT_SECONDS }}
NEXT_PUBLIC_RECAPTCHA_SITE_KEY=${{ vars.NEXT_PUBLIC_RECAPTCHA_SITE_KEY }}
NEXT_PUBLIC_GTM_ID=${{ vars.NEXT_PUBLIC_GTM_ID }}
NEXT_PUBLIC_ORY_SDK_URL=${{ vars.NEXT_PUBLIC_ORY_SDK_URL }}
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ ENV NEXT_PUBLIC_ORY_SDK_URL=${NEXT_PUBLIC_ORY_SDK_URL}
ARG NEXT_PUBLIC_SENTRY_DSN
ENV NEXT_PUBLIC_SENTRY_DSN=${NEXT_PUBLIC_SENTRY_DSN}

ARG NEXT_PUBLIC_LIVENESS_TIMEOUT_SECONDS
ENV NEXT_PUBLIC_LIVENESS_TIMEOUT_SECONDS=${NEXT_PUBLIC_LIVENESS_TIMEOUT_SECONDS}

ARG SENTRY_AUTH_TOKEN
ENV SENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN}

Expand Down
1 change: 1 addition & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
namespace NodeJS {
interface ProcessEnv {
NODE_ENV?: 'development' | 'production';
CEDULA_API?: string;
CEDULA_API_KEY?: string;
JCE_PHOTO_API?: string;
Expand Down
64 changes: 32 additions & 32 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cuenta-unica-registry",
"description": "Portal de registro de Cuenta Única",
"version": "v1.4.2",
"version": "v1.5.0",
"private": false,
"author": "OGTIC",
"license": "MIT",
Expand Down Expand Up @@ -35,58 +35,58 @@
}
},
"dependencies": {
"@aws-amplify/adapter-nextjs": "^1.2.7",
"@aws-amplify/ui-react": "^6.1.13",
"@aws-amplify/ui-react-liveness": "^3.1.1",
"@aws-sdk/client-rekognition": "^3.614.0",
"@emotion/cache": "^11.11.0",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@aws-amplify/adapter-nextjs": "^1.2.17",
"@aws-amplify/ui-react": "^6.2.1",
"@aws-amplify/ui-react-liveness": "^3.1.5",
"@aws-sdk/client-rekognition": "^3.645.0",
"@emotion/cache": "^11.13.1",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@formatjs/intl-localematcher": "^0.5.4",
"@hookform/resolvers": "^3.9.0",
"@mui/icons-material": "^5.16.4",
"@mui/material": "^5.16.4",
"@next/third-parties": "^14.2.5",
"@ory/client": "^1.14.0",
"@mui/icons-material": "^5.16.7",
"@mui/material": "^5.16.7",
"@next/third-parties": "^14.2.8",
"@ory/client": "^1.14.5",
"@ory/integrations": "^1.2.1",
"@sentry/nextjs": "^8.18.0",
"aws-amplify": "^6.4.0",
"@sentry/nextjs": "^8.28.0",
"aws-amplify": "^6.6.0",
"check-password-strength": "^2.0.10",
"hibp": "^14.1.1",
"hibp": "^14.1.2",
"negotiator": "^0.6.3",
"next": "^14.2.5",
"next": "^14.2.8",
"next-recaptcha-v3": "^1.4.1",
"react": "^18.3.1",
"react-gtm-module": "^2.0.11",
"react-hook-form": "7.52.1",
"react-hook-form": "7.53.0",
"react-imask": "^7.6.1",
"typescript": "^5.5.3",
"typescript": "^5.5.4",
"zod": "^3.23.8"
},
"devDependencies": {
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@testing-library/react": "^16.0.0",
"@commitlint/cli": "^19.4.1",
"@commitlint/config-conventional": "^19.4.1",
"@testing-library/react": "^16.0.1",
"@types/cookie": "^0.6.0",
"@types/negotiator": "^0.6.3",
"@types/node": "^20.14.11",
"@types/react": "^18.3.3",
"@types/node": "^20.16.5",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"@types/react-google-recaptcha": "^2.1.9",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@vitejs/plugin-react": "^4.3.1",
"aws-crt": "^1.21.3",
"aws-crt": "^1.22.0",
"eslint": "^8.57.0",
"eslint-config-next": "^14.2.5",
"eslint-config-next": "^14.2.8",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"husky": "^9.0.11",
"jsdom": "^24.1.0",
"lint-staged": "^15.2.7",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-prettier": "^5.2.1",
"husky": "^9.1.5",
"jsdom": "^25.0.0",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"vitest": "^2.0.3"
"vitest": "^2.0.5"
}
}
Loading

0 comments on commit a5ae2ce

Please sign in to comment.