-
Notifications
You must be signed in to change notification settings - Fork 5
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
[Enhancement] [ALS-1792] Update creds and websocket implementation #235
[Enhancement] [ALS-1792] Update creds and websocket implementation #235
Conversation
…ket-implementation
…te-creds-and-websocket-implementation [Enhancement] [ALS-1792] Update creds and websocket implementation
); | ||
}; | ||
const AppWrapper: FC<AppWrapperProps> = ({ children }) => ( | ||
<ThemeProvider theme={appTheme} nonce="dAnIsRazNonCe"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the nonce supposed to be randomly generated on every request?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be, I'll look into this. This was actually worked on by another developer at the start of this project. Even if we remove this, we will be good. I'll give that a test and let you know.
} | ||
timeout = setTimeout(() => { | ||
refreshCredentials(); | ||
}, differenceInMilliseconds(new Date(credentials.expiration || 0), new Date()) - 300); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous logic didn't have the "- 300", why is that needed now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Credentials are refreshed 5 mins before expiration. I see that the 300 is incorrect, I'll update this ASAP.
Update branch with main
@mbalfour-amzn raising another PR, since the PR I raised from forked repo shows conflicts |
@mbalfour-amzn this PR has been marked as stale and moved in draft. You can find the updated PR here that resolves the comments in this PR. This PR can be closed and branch deleted. |
This PR has the following changes;
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.