AuthApiRequest
expiresIn
transformation is missing Math.round
and causes rpc.BadRequest
error
#2708
Labels
AuthApiRequest
expiresIn
transformation is missing Math.round
and causes rpc.BadRequest
error
#2708
[READ] Step 1: Are you in the right place?
[REQUIRED] Step 2: Describe your environment
firebase-admin@12.4.0
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
AuthApiRequeset.createSessionCookie()
with a valididToken
andexpiresIn = 604800000
AuthApiRequeset.createSessionCookie()
with a valididToken
andexpiresIn = 604799998
604799.998
and expects int.Relevant Code:
The implementation is missing
Math.round(expiresIn / 1000)
. You'll see ms->s conversion is using round consistently elsewhere.firebase-admin-node/src/auth/auth-api-request.ts
Lines 1093 to 1101 in 5c92886
The text was updated successfully, but these errors were encountered: