小编joc*_*ves的帖子

未捕获的异常“Firebase\JWT\BeforeValidException”带有消息“无法处理 2016-11-03T21:37:13+0100 之前的令牌”

您好,我在尝试使用 google/apiclient 时遇到问题

致命错误:C:\xampp\htdocs\Google\vendor\firebase\php-jwt\ src\JWT.php:124 堆栈跟踪:#0 C:\xampp\htdocs\Google\vendor\google\apiclient\src\Google\AccessToken\Verify.php(100): Firebase\JWT\JWT::decode(' eyJhbGciOiJSUzI...', '-----BEGIN PUBL...', Array) #1 C:\xampp\htdocs\Google\vendor\google\apiclient\src\Google\Client.php(705): Google_AccessToken_Verify ->verifyIdToken('eyJhbGciOiJSUzI...', '474251646530-0t...') #2 C:\xampp\htdocs\Google\app\class\google_auth.php(51): Google_Client->verifyIdToken() #3 C:\xampp\htdocs\Google\app\class\google_auth.php(35): GoogleAuth->getPayLoad() #4 C:\xampp\htdocs\Google\index.php(10): GoogleAuth->checkRedirectCode() #5 {main} 在 C:\xampp\htdocs\Google\vendor\firebase\php-jwt\src\JWT.php 第 124 行中抛出

我的指数:

<?php
    require_once('app/ini.php');
    require_once('vendor/autoload.php');
    require_once('app/class/google_auth.php');


    $googleClient = new Google_Client();
    $auth = new GoogleAuth($googleClient);

    if ($auth->checkRedirectCode()) {
        header("Location: index.php");
    }

?>

<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>

    <?php if (!$auth->isLoggedIn()): //Verificar Inicio de Sesion ?>
        <a href="<?php echo $auth->getAuthUrl(); ?>">Inicie Sesion con Google</a>
    <?php else: //Si no …
Run Code Online (Sandbox Code Playgroud)

php google-api-php-client

4
推荐指数
2
解决办法
4312
查看次数

标签 统计

google-api-php-client ×1

php ×1