Merged
Conversation
…o feat/forgot-password
…o feat/forgot-password
…o fix/verify-email-ui
…to fix/microsoft-bug
…o error-handling
There was a problem hiding this comment.
Pull request overview
This PR consolidates error handling across authentication pages by introducing a centralized error message extraction utility. The changes replace scattered, inconsistent error handling logic with a single extractHttpErrorMessage function that standardizes how HTTP errors are processed and displayed to users.
Changes:
- Added
extractHttpErrorMessageutility to extract user-facing error messages from various HTTP error response shapes - Updated all authentication pages (SignIn, SignUp, ForgotPassword, ResetPassword) to use the centralized error helper
- Added interceptor integration to surface refresh token errors via sessionStorage for display on the login page
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/utils/errorHelpers.ts | New utility for extracting standardized error messages from HTTP responses |
| src/utils/attachAuthInterceptor.ts | Captures refresh token errors and stores them in sessionStorage for display |
| src/pages/auth/SignInPage.tsx | Replaces status-code-based error handling with centralized utility and displays stored auth errors |
| src/pages/auth/SignUpPage.tsx | Removes status-specific error mapping in favor of centralized extraction |
| src/pages/auth/ResetPasswordPage.tsx | Simplifies error handling by delegating to extraction utility |
| src/pages/auth/ForgotPasswordPage.tsx | Changes from generic success message to displaying actual backend errors |
| package.json | Version bump to 1.0.13 |
Zaiidmo
approved these changes
Feb 4, 2026
saadmoumou
added a commit
that referenced
this pull request
Apr 17, 2026
* Updated workflows (#10) * ops: updated release pipeline to run only on version changes, and created ci workflow * 1.0.8 * docs(workflow): add Git Flow and npm version requirements (#11) - Add Git Flow branching strategy (develop/master) - Document npm version command before push - Add prepublishOnly hook recommendation - Update workflow with proper branch management - Clear warnings about PR targeting Co-authored-by: Reda Channa <r.channa@ciscod.com> Co-authored-by: Zaiid Moumni <141942826+Zaiidmo@users.noreply.github.com> * docs: added different documentations * 1.0.9 * ops: updated publishing trigger * Fix/verify email UI (#13) * parents translate, components receive plain strings * 1.0.3 * tested in local, bug fixed * 1.0.4 * forgot and reset password done * 1.0.6 * verify email page done * merged * Unit tests (#17) * parents translate, components receive plain strings * 1.0.3 * tested in local, bug fixed * 1.0.4 * forgot and reset password done * 1.0.6 * verify email page done * merged * 1.0.10 * updated endpoints * show profile updated to match new response * added unit tests * 1.0.12 * Error handling (#18) * parents translate, components receive plain strings * 1.0.3 * tested in local, bug fixed * 1.0.4 * forgot and reset password done * 1.0.6 * verify email page done * merged * 1.0.10 * updated endpoints * show profile updated to match new response * added unit tests * added error handling to forgot password, reset password and signin/up page * 1.0.13 * feat(auth): add dynamic signup fields and custom endpoints * refactor(ui): cleanup imports and formatting in auth pages * fix(auth): remove accessToken from bootstrap useEffect deps to prevent logout bounce-back * fix: resolve lint errors, test failures and add eslint + prettier devDependencies * chore: bump version to 1.0.15 --------- Co-authored-by: Zaiid Moumni <141942826+Zaiidmo@users.noreply.github.com> Co-authored-by: Ciscode-Admin <info@ciscod.com> Co-authored-by: Reda Channa <r.channa@ciscod.com> Co-authored-by: Zaiidmo <zaiidmoumnii@gmail.com> Co-authored-by: a-elkhiraooui-ciscode <a.elkhiraoui@ciscod.com> Co-authored-by: saad moumou <saad.moumou.coder@gmail.com>
saadmoumou
added a commit
that referenced
this pull request
Apr 20, 2026
* Updated workflows (#10) * ops: updated release pipeline to run only on version changes, and created ci workflow * 1.0.8 * docs(workflow): add Git Flow and npm version requirements (#11) - Add Git Flow branching strategy (develop/master) - Document npm version command before push - Add prepublishOnly hook recommendation - Update workflow with proper branch management - Clear warnings about PR targeting Co-authored-by: Reda Channa <r.channa@ciscod.com> Co-authored-by: Zaiid Moumni <141942826+Zaiidmo@users.noreply.github.com> * docs: added different documentations * 1.0.9 * ops: updated publishing trigger * Fix/verify email UI (#13) * parents translate, components receive plain strings * 1.0.3 * tested in local, bug fixed * 1.0.4 * forgot and reset password done * 1.0.6 * verify email page done * merged * Unit tests (#17) * parents translate, components receive plain strings * 1.0.3 * tested in local, bug fixed * 1.0.4 * forgot and reset password done * 1.0.6 * verify email page done * merged * 1.0.10 * updated endpoints * show profile updated to match new response * added unit tests * 1.0.12 * Error handling (#18) * parents translate, components receive plain strings * 1.0.3 * tested in local, bug fixed * 1.0.4 * forgot and reset password done * 1.0.6 * verify email page done * merged * 1.0.10 * updated endpoints * show profile updated to match new response * added unit tests * added error handling to forgot password, reset password and signin/up page * 1.0.13 * feat(auth): add dynamic signup fields and custom endpoints * refactor(ui): cleanup imports and formatting in auth pages * fix(auth): remove accessToken from bootstrap useEffect deps to prevent logout bounce-back * fix: resolve lint errors, test failures and add eslint + prettier devDependencies * chore: bump version to 1.0.15 * test: enhance coverage for AuthKit-UI + fix typecheck and test:cov script - Fix typecheck: add paths aliases to resolve @types/react dual-version conflict - Fix test:cov script: use 'vitest run --coverage' (was watch mode) - Add vitest coverage config: include src/**, exclude models/assets - Add tests/utils/errorHelpers.test.ts: 9 tests covering extractHttpErrorMessage - Add tests/components/SocialButton.test.tsx: 3 tests for SocialButton render - Add tests/components/ProfilePage.test.tsx: 7 tests (load, edit, save, cancel, error toast) - Add tests/pages/auth/authPages.test.tsx: tests for ForgotPassword, ResetPassword, VerifyEmail, GoogleCallback, SignIn, SignUp pages - Add tests/exports.test.ts: smoke test for src/main/app re-exports Coverage: 28.81%% -> 85%% statements * fix: replace deprecated JSX.Element with React.ReactElement in AuthProvider * fix: upgrade @types/react-dom to ^19 to fix npm ci lock file mismatch --------- Co-authored-by: Zaiid Moumni <141942826+Zaiidmo@users.noreply.github.com> Co-authored-by: Ciscode-Admin <info@ciscod.com> Co-authored-by: Reda Channa <r.channa@ciscod.com> Co-authored-by: Zaiidmo <zaiidmoumnii@gmail.com> Co-authored-by: a-elkhiraooui-ciscode <a.elkhiraoui@ciscod.com> Co-authored-by: saad moumou <saad.moumou.coder@gmail.com>
Zaiidmo
added a commit
that referenced
this pull request
Apr 20, 2026
* chore: standardize package workflows and ci/cd configuration - Replace non-standard ci.yml with standardized release-check.yml and pr-validation.yml - Create dependabot.yml for automated dependency management (weekly, 5 PR limit) - Add sonarqube_mcp.instructions.md for SonarQube MCP server guidance - Ensure consistent GitHub Actions versions (v4 for checkout and setup-node) - Configure standardized Node versions (v22 for release, v20 for validation/publish) - Pin SonarQube actions to commit SHA for security hardening - Standardize branch triggers ([master, main] for release, [develop] for validation) This aligns AuthKit-UI with the standardized CI/CD pattern used across all @ciscode/* packages. * ops: added sonarqube_mcp-instructions * chore: standardize npm scripts (lint, format, typecheck, test, build, clean, verify, prepublishOnly) * chore: Standardize ESLint and Prettier configs with best practices * chore: added comprehensive changesets for release automation * docs: add standardized instruction files structure - Add comprehensive instruction files in .github/instructions/ - Includes copilot, testing, bugfix, features, general guidelines - Standardize documentation across all repositories * refactor: move instruction files to .github/instructions/ - Remove deprecated instruction files from .github/ root - Consolidate all docs in .github/instructions/ directory - Improve documentation organization * ops: UPDATED publish workflow and dependabot PR limits * ops (ci): standardize publish validation and dependabot across all packages - Replace git tag --list strategy with package.json-driven tag validation in all 16 publish workflows; use git rev-parse to verify the exact tag exists rather than guessing the latest repo-wide tag - Update error guidance to reflect feat/** → develop → master flow - Standardize dependabot to npm-only, grouped, monthly cadence across all 16 packages; remove github-actions ecosystem updates - Add missing dependabot.yml to AuthKit-UI, ChartKit-UI, HealthKit, HooksKit, paymentkit, StorageKit * security: added CODEOWNER file for branches security * ops: updated relese check workflow# * ci: update release check workflow * ops: updated release check jobs ] * Bugfix/fix auth bootstrap bounce (#19) * Updated workflows (#10) * ops: updated release pipeline to run only on version changes, and created ci workflow * 1.0.8 * docs(workflow): add Git Flow and npm version requirements (#11) - Add Git Flow branching strategy (develop/master) - Document npm version command before push - Add prepublishOnly hook recommendation - Update workflow with proper branch management - Clear warnings about PR targeting Co-authored-by: Reda Channa <r.channa@ciscod.com> Co-authored-by: Zaiid Moumni <141942826+Zaiidmo@users.noreply.github.com> * docs: added different documentations * 1.0.9 * ops: updated publishing trigger * Fix/verify email UI (#13) * parents translate, components receive plain strings * 1.0.3 * tested in local, bug fixed * 1.0.4 * forgot and reset password done * 1.0.6 * verify email page done * merged * Unit tests (#17) * parents translate, components receive plain strings * 1.0.3 * tested in local, bug fixed * 1.0.4 * forgot and reset password done * 1.0.6 * verify email page done * merged * 1.0.10 * updated endpoints * show profile updated to match new response * added unit tests * 1.0.12 * Error handling (#18) * parents translate, components receive plain strings * 1.0.3 * tested in local, bug fixed * 1.0.4 * forgot and reset password done * 1.0.6 * verify email page done * merged * 1.0.10 * updated endpoints * show profile updated to match new response * added unit tests * added error handling to forgot password, reset password and signin/up page * 1.0.13 * feat(auth): add dynamic signup fields and custom endpoints * refactor(ui): cleanup imports and formatting in auth pages * fix(auth): remove accessToken from bootstrap useEffect deps to prevent logout bounce-back * fix: resolve lint errors, test failures and add eslint + prettier devDependencies * chore: bump version to 1.0.15 --------- Co-authored-by: Zaiid Moumni <141942826+Zaiidmo@users.noreply.github.com> Co-authored-by: Ciscode-Admin <info@ciscod.com> Co-authored-by: Reda Channa <r.channa@ciscod.com> Co-authored-by: Zaiidmo <zaiidmoumnii@gmail.com> Co-authored-by: a-elkhiraooui-ciscode <a.elkhiraoui@ciscod.com> Co-authored-by: saad moumou <saad.moumou.coder@gmail.com> * Bugfix/fix auth bootstrap bounce (#22) * Updated workflows (#10) * ops: updated release pipeline to run only on version changes, and created ci workflow * 1.0.8 * docs(workflow): add Git Flow and npm version requirements (#11) - Add Git Flow branching strategy (develop/master) - Document npm version command before push - Add prepublishOnly hook recommendation - Update workflow with proper branch management - Clear warnings about PR targeting Co-authored-by: Reda Channa <r.channa@ciscod.com> Co-authored-by: Zaiid Moumni <141942826+Zaiidmo@users.noreply.github.com> * docs: added different documentations * 1.0.9 * ops: updated publishing trigger * Fix/verify email UI (#13) * parents translate, components receive plain strings * 1.0.3 * tested in local, bug fixed * 1.0.4 * forgot and reset password done * 1.0.6 * verify email page done * merged * Unit tests (#17) * parents translate, components receive plain strings * 1.0.3 * tested in local, bug fixed * 1.0.4 * forgot and reset password done * 1.0.6 * verify email page done * merged * 1.0.10 * updated endpoints * show profile updated to match new response * added unit tests * 1.0.12 * Error handling (#18) * parents translate, components receive plain strings * 1.0.3 * tested in local, bug fixed * 1.0.4 * forgot and reset password done * 1.0.6 * verify email page done * merged * 1.0.10 * updated endpoints * show profile updated to match new response * added unit tests * added error handling to forgot password, reset password and signin/up page * 1.0.13 * feat(auth): add dynamic signup fields and custom endpoints * refactor(ui): cleanup imports and formatting in auth pages * fix(auth): remove accessToken from bootstrap useEffect deps to prevent logout bounce-back * fix: resolve lint errors, test failures and add eslint + prettier devDependencies * chore: bump version to 1.0.15 * test: enhance coverage for AuthKit-UI + fix typecheck and test:cov script - Fix typecheck: add paths aliases to resolve @types/react dual-version conflict - Fix test:cov script: use 'vitest run --coverage' (was watch mode) - Add vitest coverage config: include src/**, exclude models/assets - Add tests/utils/errorHelpers.test.ts: 9 tests covering extractHttpErrorMessage - Add tests/components/SocialButton.test.tsx: 3 tests for SocialButton render - Add tests/components/ProfilePage.test.tsx: 7 tests (load, edit, save, cancel, error toast) - Add tests/pages/auth/authPages.test.tsx: tests for ForgotPassword, ResetPassword, VerifyEmail, GoogleCallback, SignIn, SignUp pages - Add tests/exports.test.ts: smoke test for src/main/app re-exports Coverage: 28.81%% -> 85%% statements * fix: replace deprecated JSX.Element with React.ReactElement in AuthProvider * fix: upgrade @types/react-dom to ^19 to fix npm ci lock file mismatch --------- Co-authored-by: Zaiid Moumni <141942826+Zaiidmo@users.noreply.github.com> Co-authored-by: Ciscode-Admin <info@ciscod.com> Co-authored-by: Reda Channa <r.channa@ciscod.com> Co-authored-by: Zaiidmo <zaiidmoumnii@gmail.com> Co-authored-by: a-elkhiraooui-ciscode <a.elkhiraoui@ciscod.com> Co-authored-by: saad moumou <saad.moumou.coder@gmail.com> * fix(security): upgrade axios >=1.14.1 and override follow-redirects >=1.15.12 to fix CVEs * style: apply prettier formatting to all files * fix(ci): correct sonar.tests path from 'test' to 'tests' and add .tsx inclusions * fix(ci): gate SonarCloud job to workflow_dispatch only, matching WidgetKit-UI pattern * added release check * style: prettier format release-check.yml --------- Co-authored-by: Zaiidmo <zaiidmoumnii@gmail.com> Co-authored-by: Zaiid Moumni <141942826+Zaiidmo@users.noreply.github.com> Co-authored-by: Ciscode-Admin <info@ciscod.com> Co-authored-by: Reda Channa <r.channa@ciscod.com> Co-authored-by: a-elkhiraooui-ciscode <a.elkhiraoui@ciscod.com> Co-authored-by: saad moumou <saad.moumou.coder@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
Checklist
npm run lintpassesnpm run typecheckpassesnpm testpassesnpm run buildpassesnpx changeset) if this affects consumersNotes