Added refresh token revocation towards Cognito when logging out
Changes
logout function now performs a post request to ${cognitoAuthPath}/oauth2/revoke to revoke the current valid refresh token so it cannot be used anymore, log a warning in case of failure since it should not disrupt UX
Changelog entry
How Has This Been Tested?
References
PR Quality Checklist
[ ] I added tests to new or existing code
[ ] I removed hardcoded strings and used our i18n solution instead (see here)
[x] I made sure no sensitive info gets logged at any time in the codebase (see here) (e.g. no user info or details, no stacktraces, etc.)
[ ] I checked that infrastructure/update_infrastructure.sh runs without any error
[x] I checked that npm run build builds without any error
[x] I checked that clusters are listed correctly
[x] I checked that a new cluster can be created (config is produced and dry run passes)
[x] I checked that login and logout work as expected
It's not necessary for this PR, but it would be a good time to add a simple e2e test to check logout works properly, I don't think we have one as of yet
Description
Added refresh token revocation towards Cognito when logging out
Changes
${cognitoAuthPath}/oauth2/revoke
to revoke the current valid refresh token so it cannot be used anymore, log a warning in case of failure since it should not disrupt UXChangelog entry
How Has This Been Tested?
References
PR Quality Checklist
i18n
solution instead (see here)npm run build
builds without any errorIn order to increase the likelihood of your contribution being accepted, please make sure you have read both the Contributing Guidelines and the Project Guidelines
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.