fix: Throw error on user disabled and check revoked set true#1401
Merged
fix: Throw error on user disabled and check revoked set true#1401
Conversation
hiranya911
suggested changes
Aug 5, 2021
Contributor
hiranya911
left a comment
There was a problem hiding this comment.
Needs a bit of refactoring to make sure we don't call getUser() more than once. But mostly looks pretty good.
bojeil-google
suggested changes
Aug 7, 2021
hiranya911
reviewed
Aug 10, 2021
Contributor
hiranya911
left a comment
There was a problem hiding this comment.
The integration test passed for me without currentUser.reload(). Can we try that out with our CI and see what happens?
bojeil-google
suggested changes
Aug 12, 2021
egilmorez
reviewed
Aug 13, 2021
Contributor
egilmorez
left a comment
There was a problem hiding this comment.
A few style things to look at, thanks!
bojeil-google
suggested changes
Aug 13, 2021
This was referenced Jul 17, 2024
This was referenced Jul 27, 2024
This was referenced Aug 10, 2024
This was referenced Aug 17, 2024
This was referenced Aug 28, 2024
This was referenced Sep 24, 2024
This was referenced Oct 26, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the logic to throw error in verifySessionCookie and verifyIdToken when user disabled and checkRevoked is true.
The logic might not look most efficient, but it is rather a simple approach without changing logic and breaking other tests.
RELEASE NOTE: When
checkRevokedis set totrue, theverifyIdToken()andverifySessionCookie()APIs now throw an error if the user record is disabled.