Skip to content

fix: Throw error on user disabled and check revoked set true - #1401

Merged
xil222 merged 18 commits into
masterfrom
verifyIdToken
Aug 16, 2021
Merged

fix: Throw error on user disabled and check revoked set true#1401
xil222 merged 18 commits into
masterfrom
verifyIdToken

Conversation

@xil222

@xil222xil222 commented Aug 4, 2021

Copy link
Copy Markdown
Contributor

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 checkRevoked is set to true, the verifyIdToken() and verifySessionCookie() APIs now throw an error if the user record is disabled.

@hiranya911hiranya911 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Needs a bit of refactoring to make sure we don't call getUser() more than once. But mostly looks pretty good.

Comment threadsrc/auth/auth.ts Outdated
Comment threadsrc/auth/auth.ts Outdated
Comment threadtest/integration/auth.spec.ts Outdated
Comment threadtest/integration/auth.spec.ts Outdated
Comment threadsrc/auth/auth.ts Outdated
Comment threadsrc/auth/auth.ts Outdated
Comment threadsrc/auth/auth.ts Outdated
Comment threadsrc/auth/auth.ts Outdated
Comment threadsrc/utils/error.ts Outdated
Comment threadtest/integration/auth.spec.ts Outdated
@xil222
xil222 requested review from egilmorez and removed request for lsiracAugust 9, 2021 23:35
@hiranya911hiranya911 added the release:stage Stage a release candidate label Aug 10, 2021

@hiranya911hiranya911 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The integration test passed for me without currentUser.reload(). Can we try that out with our CI and see what happens?

Comment threadsrc/auth/auth.ts Outdated
Comment threadtest/integration/auth.spec.ts Outdated

@hiranya911hiranya911 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍

@xil222xil222 removed their assignment Aug 12, 2021
Comment threadsrc/auth/auth.ts Outdated
Comment threadsrc/auth/auth.ts Outdated
Comment threadsrc/auth/auth.ts Outdated
Comment threadtest/integration/auth.spec.ts Outdated
Comment threadtest/integration/auth.spec.ts Outdated
Comment threadtest/unit/auth/auth.spec.ts Outdated
Comment threadtest/unit/auth/auth.spec.ts
Comment threadtest/unit/auth/auth.spec.ts

@egilmorezegilmorez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A few style things to look at, thanks!

Comment threadsrc/auth/auth.ts Outdated
Comment threadsrc/auth/auth.ts Outdated
Comment threadsrc/auth/auth.ts Outdated
Comment threadsrc/auth/auth.ts Outdated
Comment threadsrc/auth/auth.ts Outdated
Comment threadsrc/auth/auth.ts Outdated
Comment threadsrc/auth/auth.ts Outdated
Comment threadtest/unit/auth/auth.spec.ts Outdated
Comment threadtest/unit/auth/auth.spec.ts Outdated
Comment threadtest/integration/auth.spec.ts Outdated
Comment threadtest/integration/auth.spec.ts Outdated
@lahirumaramba
lahirumaramba deleted the verifyIdToken branch February 18, 2026 19:52
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:stageStage a release candidaterelease-note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@xil222@hiranya911@egilmorez@bojeil-google@lahirumaramba