@@ -43,7 +43,7 @@ chai.use(chaiAsPromised);
4343const expect = chai . expect ;
4444
4545const ALGORITHM = 'RS256' ;
46- const ONE_HOUR_IN_SECONDS = 60 * 60 ;
46+ const FIVE_MIN_IN_SECONDS = 60 * 5 ;
4747const FIREBASE_APP_CHECK_AUDIENCE = 'https://firebaseappcheck.googleapis.com/google.firebase.appcheck.v1beta.TokenExchangeService' ;
4848
4949/**
@@ -184,7 +184,7 @@ describe('AppCheckTokenGenerator', () => {
184184 // eslint-disable-next-line @typescript-eslint/camelcase
185185 app_id : APP_ID ,
186186 iat : 1 ,
187- exp : ONE_HOUR_IN_SECONDS + 1 ,
187+ exp : FIVE_MIN_IN_SECONDS + 1 ,
188188 aud : FIREBASE_APP_CHECK_AUDIENCE ,
189189 iss : mocks . certificateObject . client_email ,
190190 sub : mocks . certificateObject . client_email ,
@@ -205,7 +205,7 @@ describe('AppCheckTokenGenerator', () => {
205205 // eslint-disable-next-line @typescript-eslint/camelcase
206206 app_id : APP_ID ,
207207 iat : 1 ,
208- exp : ONE_HOUR_IN_SECONDS + 1 ,
208+ exp : FIVE_MIN_IN_SECONDS + 1 ,
209209 aud : FIREBASE_APP_CHECK_AUDIENCE ,
210210 iss : mocks . certificateObject . client_email ,
211211 sub : mocks . certificateObject . client_email ,
@@ -233,7 +233,7 @@ describe('AppCheckTokenGenerator', () => {
233233 // eslint-disable-next-line @typescript-eslint/camelcase
234234 app_id : APP_ID ,
235235 iat : 1 ,
236- exp : ONE_HOUR_IN_SECONDS + 1 ,
236+ exp : FIVE_MIN_IN_SECONDS + 1 ,
237237 aud : FIREBASE_APP_CHECK_AUDIENCE ,
238238 iss : mocks . certificateObject . client_email ,
239239 sub : mocks . certificateObject . client_email ,
@@ -275,15 +275,15 @@ describe('AppCheckTokenGenerator', () => {
275275 } ) ;
276276 } ) ;
277277
278- it ( 'should be fulfilled with a JWT which expires after one hour ' , ( ) => {
278+ it ( 'should be fulfilled with a JWT which expires after five minutes ' , ( ) => {
279279 clock = sinon . useFakeTimers ( 1000 ) ;
280280
281281 let token : string ;
282282 return tokenGenerator . createCustomToken ( APP_ID )
283283 . then ( ( result ) => {
284284 token = result ;
285285
286- clock ! . tick ( ( ONE_HOUR_IN_SECONDS * 1000 ) - 1 ) ;
286+ clock ! . tick ( ( FIVE_MIN_IN_SECONDS * 1000 ) - 1 ) ;
287287
288288 // Token should still be valid
289289 return verifyToken ( token , mocks . keyPairs [ 0 ] . public ) ;
0 commit comments