Skip to content

Commit

Permalink
fix(core): 18520 auth fixes and refactors (#819)
Browse files Browse the repository at this point in the history
* implemented end session flow via endpoint

* automatic logout only on 401 from dedicated request to token endpoint

* refresh token during authClient init, all requests will use fresh token from app start

* extracted token management from apiClient to OidcSimpleClient,

* authClientInstance is OidcSimpleClient now, AuthClient and irrelevant code removed, necessary methods are used directly

* adjusted naming in auth-related code to align more with standarts and existing solutions

* move ~core/auth/types to ~core/app/types as it has app-related types

* simplify and streamline init flow, remove unecessary atoms dependencies, reduce early activation issues

* reduce reactive usage of featureFlags

* add Suspense with preloader in view hierarchy to keep sidebar visible during loading, fixes (19141) 

* map adapter: removed heavy react-dom/server dependency (~50kb in bundle) and unused or irrelevant code

* drop date-fns in favor of native function
  • Loading branch information
vkozio authored Aug 9, 2024
1 parent eb972a6 commit c6dfd34
Show file tree
Hide file tree
Showing 52 changed files with 1,664 additions and 2,025 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/ban-ts-comment": "warn",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "warn",
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": "warn",
"@typescript-eslint/explicit-module-boundary-types": "off",
"react/jsx-filename-extension": [
"warn",
Expand Down
55 changes: 27 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,16 @@
"@nebula.gl/layers": "1.1.0-alpha.5",
"@paypal/react-paypal-js": "^8.5.0",
"@reatom/async": "^3.15.2",
"@reatom/core": "^3.8.3",
"@reatom/core": "^3.9.0",
"@reatom/core-v2": "^3.1.4",
"@reatom/hooks": "^3.5.5",
"@reatom/logger": "^3.8.4",
"@reatom/npm-react": "^3.8.10",
"@reatom/react-v2": "^3.1.2",
"@sentry/react": "^7.113.0",
"@slack/web-api": "^7.0.4",
"@testing-library/react": "^14.2.1",
"@sentry/react": "^8.18.0",
"@slack/web-api": "^7.3.1",
"@testing-library/dom": "^10.3.2",
"@testing-library/react": "^16.0.0",
"@turf/area": "6.5.0",
"@turf/bbox": "^6.5.0",
"@turf/centroid": "^6.5.0",
Expand All @@ -115,7 +116,7 @@
"@types/d3-interpolate": "^3.0.4",
"@types/file-saver": "^2.0.7",
"@types/geojson": "^7946.0.14",
"@types/node": "^20.14.9",
"@types/node": "^20.14.11",
"@types/papaparse": "^5.3.14",
"@types/react": "^18.2.65",
"@types/react-dom": "^18.2.22",
Expand All @@ -124,19 +125,18 @@
"@types/react-transition-group": "^4.4.10",
"@types/sinon": "^17.0.3",
"@types/w3c-generic-sensor": "^1.0.9",
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"@uiw/react-github-corners": "1.5.16",
"@vitejs/plugin-react": "^4.3.1",
"@vitest/coverage-v8": "^1.6.0",
"ajv": "^8.16.0",
"autoprefixer": "^10.4.19",
"@vitest/coverage-v8": "^2.0.5",
"ajv": "^8.17.1",
"autoprefixer": "^10.4.20",
"bundle-size-diff": "github:konturio/bundle-size-diff#v1.0.7",
"clsx": "^1.2.1",
"cpr": "^3.0.1",
"d3-color": "^3.1.0",
"d3-interpolate": "^3.0.1",
"date-fns": "^2.30.0",
"dependency-cruiser": "^15.5.0",
"dnd-core": "^16.0.1",
"emoji-regex": "^10.3.0",
Expand All @@ -145,22 +145,23 @@
"eslint-plugin-i18n-checker": "^1.4.0",
"eslint-plugin-i18n-json": "^4.0.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"file-saver": "^2.0.5",
"geojson-polygon-self-intersections": "^1.2.1",
"gettext-parser": "^8.0.0",
"happy-dom": "^12.10.3",
"happy-dom": "^14.12.3",
"hash-wasm": "^4.11.0",
"history": "^5.3.0",
"hsluv": "^1.0.1",
"i18next": "^22.5.1",
"i18next-browser-languagedetector": "^7.2.0",
"i18next-conv": "14.0.0",
"i18next-scanner": "^4.4.0",
"i18next-scanner": "^4.5.0",
"jwt-decode": "^4.0.0",
"lint-staged": "^15.2.7",
"lint-staged": "^15.2.8",
"maplibre-gl": "^3.6.2",
"markdown-to-jsx": "^7.4.7",
"mdast": "^3.0.0",
"mdast-util-from-markdown": "^2.0.1",
"minimist": "^1.2.8",
Expand All @@ -170,7 +171,7 @@
"papaparse": "^5.4.1",
"patch-package": "^8.0.0",
"postcss-custom-media": "^8.0.2",
"postcss-nested": "^6.0.1",
"postcss-nested": "^6.2.0",
"postcss-normalize": "^10.0.1",
"prettier": "^3.2.5",
"react": "^18.2.0",
Expand All @@ -184,29 +185,27 @@
"react-lazily": "^0.9.2",
"react-markdown": "^8.0.7",
"react-promise-suspense": "^0.3.4",
"react-router": "^6.24.1",
"react-router-dom": "^6.24.1",
"react-router": "^6.25.1",
"react-router-dom": "^6.25.1",
"react-transition-group": "^4.4.5",
"react-virtuoso": "^4.7.11",
"remark-gfm": "^3.0.1",
"react-virtuoso": "^4.9.0",
"rollup-plugin-visualizer": "^5.12.0",
"sinon": "^17.0.1",
"sinon": "^18.0.0",
"stylelint": "^16.2.1",
"stylelint-config-recommended": "^14.0.1",
"superstruct": "^1.0.4",
"surge": "^0.23.1",
"ts-json-schema-generator": "^2.3.0",
"tsx": "^4.15.7",
"typescript": "5.4.5",
"tsx": "^4.17.0",
"typescript": "5.5.3",
"typescript-plugin-css-modules": "^5.1.0",
"uhtml": "^4.5.9",
"utility-types": "^3.11.0",
"vi-fetch": "^0.8.0",
"vite": "~5.3.3",
"vite": "~5.4.0",
"vite-plugin-html": "^3.2.2",
"vite-plugin-mkcert": "^1.17.5",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^1.6.0",
"vite-tsconfig-paths": "^5.0.1",
"vitest": "^2.0.5",
"wretch": "^2.9.0"
},
"devDependencies": {
Expand All @@ -219,7 +218,7 @@
"open-cli": "^7.2.0",
"playwright-slack-report": "^1.1.81",
"prompts": "^2.4.2",
"semver": "^7.6.0"
"semver": "^7.6.3"
},
"pnpm": {
"patchedDependencies": {
Expand Down
Loading

0 comments on commit c6dfd34

Please sign in to comment.