mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
also check for presence of pub & priv key
This commit is contained in:
parent
cf8ca47cc6
commit
a117b325cf
@ -168,6 +168,10 @@ export class UserResolver {
|
|||||||
// TODO we want to catch this on the frontend and ask the user to check his emails or resend code
|
// TODO we want to catch this on the frontend and ask the user to check his emails or resend code
|
||||||
throw new Error('User has no password set yet')
|
throw new Error('User has no password set yet')
|
||||||
}
|
}
|
||||||
|
if (!loginUser.pubKey || !loginUser.privKey) {
|
||||||
|
// TODO we want to catch this on the frontend and ask the user to check his emails or resend code
|
||||||
|
throw new Error('User has no private or publicKey')
|
||||||
|
}
|
||||||
const passwordHash = SecretKeyCryptographyCreateKey(email, password) // return short and long hash
|
const passwordHash = SecretKeyCryptographyCreateKey(email, password) // return short and long hash
|
||||||
const loginUserPassword = BigInt(loginUser.password.toString())
|
const loginUserPassword = BigInt(loginUser.password.toString())
|
||||||
if (loginUserPassword !== passwordHash[0].readBigUInt64LE()) {
|
if (loginUserPassword !== passwordHash[0].readBigUInt64LE()) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user