mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Update backend/src/graphql/resolver/UserResolver.ts
Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de>
This commit is contained in:
parent
623ba8e86b
commit
e9ff0a8ed1
@ -184,7 +184,7 @@ const getOptInCode = async (loginUserId: number): Promise<LoginEmailOptIn> => {
|
|||||||
emailOptInTypeId: EMAIL_OPT_IN_RESET_PASSWORD,
|
emailOptInTypeId: EMAIL_OPT_IN_RESET_PASSWORD,
|
||||||
})
|
})
|
||||||
|
|
||||||
// Check for 10 minute delay
|
// Check for `CONFIG.EMAIL_CODE_VALID_TIME` minute delay
|
||||||
if (optInCode) {
|
if (optInCode) {
|
||||||
const timeElapsed = Date.now() - new Date(optInCode.updatedAt).getTime()
|
const timeElapsed = Date.now() - new Date(optInCode.updatedAt).getTime()
|
||||||
if (timeElapsed <= parseInt(CONFIG.EMAIL_CODE_VALID_TIME.toString()) * 60 * 1000) {
|
if (timeElapsed <= parseInt(CONFIG.EMAIL_CODE_VALID_TIME.toString()) * 60 * 1000) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user