Skip to content

Conversation

@avishalom
Copy link
Contributor

Adding a 1 second timeout in the integration tests to make sure revoke happens 1 second after minting. also comment

Copy link
Contributor

@hiranya911 hiranya911 left a comment

Choose a reason for hiding this comment

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

LGTM with a couple of nits. Please wait for @bojeil-google to take a look before merging.

"@firebase/util": "0.1.2"
}
},
"@firebase/auth": {
Copy link
Contributor

Choose a reason for hiding this comment

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

It is weird to have changes in the lock file without corresponding changes in package.json. Please revert.

* before revocation will also be revoked on the Auth backend. Any request with an
* ID token generated before revocation will be rejected with a token expired error.
* Note that due to the fact that the timestamp is stored in seconds, any tokens minted in
* the same second as the revokation will still be valid. If there is a chance that a token
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: revokation --> revocation

.then((decodedIdToken) => {
// Verification should succeed. Revoke that user's session.
return admin.auth().revokeRefreshTokens(decodedIdToken.sub);
return new Promise(resolve => setTimeout(() => resolve(
Copy link
Contributor

Choose a reason for hiding this comment

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

(resolve) =>

@hiranya911 hiranya911 removed their assignment Jan 26, 2018
* ID token generated before revocation will be rejected with a token expired error.
* Note that due to the fact that the timestamp is stored in seconds, any tokens minted in
* the same second as the revocation will still be valid. If there is a chance that a token
* was minted in the last second, delay for 1 second before revoking.
Copy link
Contributor

Choose a reason for hiding this comment

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

Extra space before was minted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants