Skip to content

Conversation

@Taimoor0217
Copy link
Member

No description provided.


const hash = (text: any) =>
crypto.createHash("sha256").update(text).digest("hex");
const defaultKeyWord = "12345";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's force the ENV to exist. We don't want to accidentally forget it and use 12345 as the key.

hashedRefreshToken,
encryptedAccessToken,
"EX",
2 * (HOUR_IN_SECONDS - 120) //set expiry to be after 1 hour 58 minutes

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this ends up being 1 hour 56 minutes, which is fine, but might want to update it.
2 * (3600 - 120) = 7200 - 240 = 6960 => 116 minutes

Copy link

@patrickbrennan-ecomshft patrickbrennan-ecomshft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just have the removal of the default key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants