Php 如何增加Firebase令牌的到期时间?
有人知道增加Firebase令牌的到期时间吗?我正在使用Firebase/php jwt。在这之后。当我将时间增加到3600以上时,令牌将无效。有人能帮我吗Php 如何增加Firebase令牌的到期时间?,php,wordpress,firebase,firebase-authentication,Php,Wordpress,Firebase,Firebase Authentication,有人知道增加Firebase令牌的到期时间吗?我正在使用Firebase/php jwt。在这之后。当我将时间增加到3600以上时,令牌将无效。有人能帮我吗 $now_seconds = time(); $payload = array( "iss" => $service_account_email, "sub" => $service_account_email, "aud" => "https://identitytoolkit.googleapis.com/google
$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");
从:
exp
-到期时间
自UNIX纪元以来,令牌
过期它可以比iat晚3600秒
目前无法在Firebase身份验证ID令牌上使用更长的过期期限 您需要使用signInWithCustomToken()方法签名,以使令牌具有更高的到期时间(直到会话超时/用户手动注销)