mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-18 13:52:51 +00:00
Closes #11006 # Which Problems Are Solved This PR addresses an issue where the ignoreUnknownUsernames setting was not being respected in certain scenarios during the login flow. Specifically: - When a user was found but rejected due to login settings (e.g., disableLoginWithEmail), the system would return a "User not found" error instead of redirecting to the password page as dictated by ignoreUnknownUsernames. - When a user was not found, and the flow fell through the registration checks (e.g., IDP redirect failed), it would also return "User not found" without checking ignoreUnknownUsernames. # How the Problems Are Solved - Introduced a helper function `handleUserNotFound` in `apps/login/src/lib/server/loginname.ts` to centralize the logic for checking ignoreUnknownUsernames and redirecting to the password page. - Updated the user validation logic to call handleUserNotFound when a user is found but rejected by policy. - Updated the registration fallback logic to call handleUserNotFound instead of directly returning an error. - Added new test cases in `apps/login/src/lib/server/loginname.test.ts` to verify the fix and ensure no regressions. # Additional Changes - Fixed inconsistency in translation files --------- Co-authored-by: Livio Spring <[email protected]>
97 lines
3.0 KiB
JSON
97 lines
3.0 KiB
JSON
{
|
|
"packageManager": "[email protected]",
|
|
"name": "@zitadel/login",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"build": "NEXT_OUTPUT_MODE=standalone next build && cp -r public scripts/* .next/standalone/ && cp -r .next/static .next/standalone/apps/login/.next/ && rm .next/standalone/apps/login/.env",
|
|
"build-vercel": "next build",
|
|
"dev": "HOSTNAME=127.0.0.1 ./scripts/entrypoint.sh next dev",
|
|
"prod": "cd ./.next/standalone && HOSTNAME=127.0.0.1 ./entrypoint.sh node apps/login/server.js",
|
|
"lint-check-next": "next lint",
|
|
"lint-check-prettier": "prettier --check .",
|
|
"lint-fix": "prettier --write .",
|
|
"test-unit": "vitest --run",
|
|
"lint-staged": "lint-staged",
|
|
"clean": "rm -rf node_modules .next cypress"
|
|
},
|
|
"pnpm": {
|
|
"overrides": {
|
|
"form-data@>=4.0.0 <4.0.4": ">=4.0.4"
|
|
}
|
|
},
|
|
"git": {
|
|
"pre-commit": "lint-staged"
|
|
},
|
|
"lint-staged": {
|
|
"*": "prettier --write --ignore-unknown"
|
|
},
|
|
"dependencies": {
|
|
"@headlessui/react": "^2.2.9",
|
|
"@heroicons/react": "^2.2.0",
|
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
"@tailwindcss/forms": "^0.5.11",
|
|
"clsx": "^2.1.1",
|
|
"copy-to-clipboard": "^3.3.3",
|
|
"deepmerge": "^4.3.1",
|
|
"lucide-react": "^0.562.0",
|
|
"moment": "^2.30.1",
|
|
"next": "15.5.9",
|
|
"next-intl": "^3.26.5",
|
|
"next-themes": "^0.2.1",
|
|
"nice-grpc": "^2.1.14",
|
|
"qrcode.react": "^4.2.0",
|
|
"react": "19.2.3",
|
|
"react-dom": "19.2.3",
|
|
"react-hook-form": "^7.70.0",
|
|
"tinycolor2": "^1.6.0",
|
|
"uuid": "^13.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/eslint-parser": "^7.28.5",
|
|
"@bufbuild/buf": "^1.62.1",
|
|
"@faker-js/faker": "^9.9.0",
|
|
"@otplib/core": "^12.0.1",
|
|
"@otplib/plugin-crypto": "^12.0.1",
|
|
"@otplib/plugin-thirty-two": "^12.0.1",
|
|
"@playwright/test": "^1.57.0",
|
|
"@testing-library/jest-dom": "^6.9.1",
|
|
"@testing-library/react": "^16.3.1",
|
|
"@types/node": "^22.19.3",
|
|
"@types/react": "19.2.7",
|
|
"@types/react-dom": "19.2.3",
|
|
"@types/uuid": "^10.0.0",
|
|
"@types/tinycolor2": "^1.4.6",
|
|
"@typescript-eslint/eslint-plugin": "^8.52.0",
|
|
"@typescript-eslint/parser": "^8.52.0",
|
|
"@vercel/git-hooks": "1.0.0",
|
|
"@vitejs/plugin-react": "^4.7.0",
|
|
"@zitadel/client": "workspace:*",
|
|
"@zitadel/proto": "workspace:*",
|
|
"autoprefixer": "^10.4.23",
|
|
"concurrently": "^9.2.1",
|
|
"cypress": "^14.5.4",
|
|
"dotenv-cli": "^8.0.0",
|
|
"env-cmd": "^10.1.0",
|
|
"eslint": "^8.57.1",
|
|
"eslint-config-next": "15.5.9",
|
|
"eslint-config-prettier": "^9.1.2",
|
|
"gaxios": "^7.1.3",
|
|
"grpc-tools": "^1.13.1",
|
|
"jsdom": "^26.1.0",
|
|
"lint-staged": "15.5.1",
|
|
"nodemon": "^3.1.11",
|
|
"postcss": "^8.5.6",
|
|
"prettier": "^3.7.4",
|
|
"prettier-plugin-organize-imports": "^4.3.0",
|
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
"sass": "^1.97.1",
|
|
"start-server-and-test": "^2.1.3",
|
|
"tailwindcss": "3.4.14",
|
|
"ts-proto": "^2.10.1",
|
|
"typescript": "^5.9.3",
|
|
"vite-tsconfig-paths": "^5.1.4",
|
|
"vitest": "^2.1.9"
|
|
}
|
|
}
|