How can I increase the expiry time of a Firebase token?

Viewed 6157

Does anyone know to increase the expiry time of a Firebase token? I am using Firebase/php-jwt. Following the custom token generation documentation. When I increase the time beyond 3600, the token becomes invalid. Can anyone help me please?

$now_seconds = time();
$payload = array(
"iss" => $service_account_email,
"sub" => $service_account_email,
"aud" => "https://identitytoolkit.googleapis.com/google.identity.identitytoolkit.v1.IdentityToolkit",
"iat" => $now_seconds,
"exp" => $now_seconds+(60*60),  // Maximum expiration time is one hour
"uid" => $uid,
"claims" => array(
  "premium_account" => $is_premium_account
)
);
return JWT::encode($payload, $private_key, "RS256");
1 Answers
Related