Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[_] fix: added future iat to new tokens issued on password change #406

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

apsantiso
Copy link
Collaborator

@apsantiso apsantiso commented Oct 3, 2024

Token's IAT do not include milliseconds, so we create new tokens with an IAT 60 seconds ahead so they are valid when compared against lastPasswordChangedAt value.

This is the same implementation we have on drive-server, I'm just migrating it.

} from './passport';

describe('JWT Utility Functions', () => {
const secret = 'test_secret';

Check failure

Code scanning / CodeQL

Hard-coded credentials Critical test

The hard-coded value "test_secret" is used as
jwt key
.
The hard-coded value "test_secret" is used as
jwt key
.
The hard-coded value "test_secret" is used as
jwt key
.
The hard-coded value "test_secret" is used as
jwt key
.
The hard-coded value "test_secret" is used as
jwt key
.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Used in tests, dismissed this issue.

Copy link

sonarcloud bot commented Oct 3, 2024

@apsantiso apsantiso merged commit 4ea09f1 into master Oct 3, 2024
10 of 11 checks passed
@apsantiso apsantiso deleted the fix/return-tokens-on-password-change branch October 3, 2024 13:10
@apsantiso apsantiso changed the title [_] fix: added future Iat to new tokens on password change [_] fix: added future iat to new tokens issued on password change Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready-for-preview
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant