Skip to content

Commit e6b6625

Browse files
committed
Update comments
1 parent a218674 commit e6b6625

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

packages/app/src/firebaseServerApp.test.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,6 @@ describe('FirebaseServerApp', () => {
305305
);
306306
} catch (e) {
307307
encounteredError = true;
308-
//expect((e as Error).toString()).to.contain(
309-
// 'Unexpected end of JSON input'
310-
//);
311308
}
312309
expect(encounteredError).to.be.true;
313310
});

packages/app/src/firebaseServerApp.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ function validateTokenTTL(base64Token: string, tokenName: string): void {
4545
}
4646
const exp = JSON.parse(secondPart).exp * 1000;
4747
const now = new Date().getTime();
48-
// const now = new Date(new Date().getDate() - 1).now()
4948
const diff = exp - now;
5049
if (diff <= 0) {
5150
throw ERROR_FACTORY.create(AppError.SERVER_APP_TOKEN_EXPIRED, {
@@ -94,12 +93,12 @@ export class FirebaseServerAppImpl
9493
...serverConfig
9594
};
9695

97-
// Validate the authIdtoken validation window.
96+
// Ensure that the current time is within the authIdtoken window of validity.
9897
if (this._serverConfig.authIdToken) {
9998
validateTokenTTL(this._serverConfig.authIdToken, 'authIdToken');
10099
}
101100

102-
// Validate the appCheckToken validation window.
101+
// Ensure that the current time is within the appCheckToken window of validity.
103102
if (this._serverConfig.appCheckToken) {
104103
validateTokenTTL(this._serverConfig.appCheckToken, 'appCheckToken');
105104
}

0 commit comments

Comments
 (0)