Skip to content

Commit

Permalink
Use Auth SDK (#1593)
Browse files Browse the repository at this point in the history
* Use Auth SDK

* Update auth provider hook

* Update sdk module mapping

* Update setting password

* Fix no user details on first login

* Update auth tests

* Cleanups

* Update SDK

Update SDK

Update SDK

Update test recordings

Update SDK

* Implement SDK External Auth

Update new password view

Hnalde external logout

Update SDK

Fix logout external redirect

* Fix login page style

* Update SDK

* Auth Provider cleanups

Update and refactor auth

Auth types cleanups and refactor

* Update channel context provider

* Fix login error handling

* Logout immidiatelly non-staff user

* Fix webpack.config and package.lock

* Trigger CI

* Update to SDK v0.4, remove duplicated UserContext hook

* Handle server errors during login

* Fix wrong login page form submition handling

* Update login error messages

Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
  • Loading branch information
orzechdev and jwm0 authored Dec 17, 2021
1 parent d2a1715 commit be9e2ef
Show file tree
Hide file tree
Showing 59 changed files with 1,011 additions and 1,608 deletions.
18 changes: 12 additions & 6 deletions locale/defaultMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1218,20 +1218,26 @@
"context": "link",
"string": "Use this link to recover it"
},
"src_dot_auth_dot_components_dot_LoginPage_dot_3476994590": {
"string": "Sorry, your username and/or password are incorrect. Please try again."
},
"src_dot_auth_dot_components_dot_LoginPage_dot_3762459576": {
"context": "description",
"string": "or login using"
},
"src_dot_auth_dot_components_dot_LoginPage_dot_534894384": {
"string": "Sorry, login went wrong. Please try again."
},
"src_dot_auth_dot_components_dot_LoginPage_dot_599516345": {
"context": "description",
"string": "Forgot password? {resetPasswordLink}"
},
"src_dot_auth_dot_components_dot_LoginPage_dot_externalLoginError": {
"context": "error message",
"string": "Sorry, login went wrong. Please try again."
},
"src_dot_auth_dot_components_dot_LoginPage_dot_loginError": {
"context": "error message",
"string": "Sorry, your username and/or password are incorrect. Please try again."
},
"src_dot_auth_dot_components_dot_LoginPage_dot_serverError": {
"context": "error message",
"string": "Saleor is unavailable, please check your network connection and try again."
},
"src_dot_auth_dot_components_dot_NewPasswordPage_dot_1254879564": {
"string": "New Password"
},
Expand Down
130 changes: 129 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"npm": ">=6.11.0 <7"
},
"dependencies": {
"@apollo/client": "^3.4.15",
"@editorjs/editorjs": "^2.19.3",
"@editorjs/header": "^2.6.1",
"@editorjs/image": "^2.6.0",
Expand All @@ -28,6 +29,7 @@
"@material-ui/lab": "^4.0.0-alpha.58",
"@material-ui/styles": "^4.11.4",
"@saleor/macaw-ui": "^0.2.7",
"@saleor/sdk": "^0.4.0",
"@sentry/react": "^6.0.0",
"@types/faker": "^5.1.6",
"apollo": "^2.32.5",
Expand Down Expand Up @@ -107,7 +109,6 @@
"@types/fuzzaldrin": "^2.1.2",
"@types/jest": "^24.0.24",
"@types/lodash-es": "^4.17.3",
"@types/node-fetch": "^2.5.7",
"@types/pollyjs__adapter-node-http": "^2.0.1",
"@types/pollyjs__persister-fs": "^2.0.1",
"@types/react": "^16.9.16",
Expand Down Expand Up @@ -158,7 +159,6 @@
"jest-localstorage-mock": "^2.4.3",
"lint-staged": "^10.5.1",
"mock-apollo-client": "^0.4.0",
"node-fetch": "^2.6.1",
"prettier": "^1.19.1",
"react-intl-translations-manager": "^5.0.3",
"react-test-renderer": "^16.12.0",
Expand Down Expand Up @@ -209,7 +209,7 @@
"moduleNameMapper": {
"@assets(.*)$": "<rootDir>/assets/$1",
"@locale(.*)$": "<rootDir>/locale/$1",
"@saleor(?!.*macaw)(.*)$": "<rootDir>/src/$1",
"@saleor(?!.*macaw)(?!.*sdk)(.*)$": "<rootDir>/src/$1",
"@test/(.*)$": "<rootDir>/testUtils/$1",
"^lodash-es(.*)$": "lodash/$1",
"^@material-ui/core$": "<rootDir>/node_modules/@material-ui/core",
Expand Down

This file was deleted.

Loading

0 comments on commit be9e2ef

Please sign in to comment.