crf fix when logged out

This commit is contained in:
Dobromir Popov
2024-05-03 16:47:28 +03:00
parent e20bd294af
commit 75573340f8
2 changed files with 3 additions and 7 deletions

6
package-lock.json generated
View File

@ -26,7 +26,6 @@
"axios": "^1.6.7", "axios": "^1.6.7",
"axios-jwt": "^4.0.2", "axios-jwt": "^4.0.2",
"bcrypt": "^5.1.1", "bcrypt": "^5.1.1",
"bcryptjs": "^2.4.3",
"date-fns": "^3.3.1", "date-fns": "^3.3.1",
"docx": "^8.5.0", "docx": "^8.5.0",
"docx-templates": "^4.11.4", "docx-templates": "^4.11.4",
@ -5499,11 +5498,6 @@
"tweetnacl": "^0.14.3" "tweetnacl": "^0.14.3"
} }
}, },
"node_modules/bcryptjs": {
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz",
"integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ=="
},
"node_modules/bidi-js": { "node_modules/bidi-js": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.0.3.tgz", "resolved": "https://registry.npmjs.org/bidi-js/-/bidi-js-1.0.3.tgz",

View File

@ -131,9 +131,11 @@ export default function SignIn({ csrfToken }) {
// This gets called on every request // This gets called on every request
export async function getServerSideProps(context) { export async function getServerSideProps(context) {
const csrfToken = await getCsrfToken(context);
return { return {
props: { props: {
csrfToken: await getCsrfToken(context), ...(csrfToken ? { csrfToken } : {}),
}, },
}; };
} }