Closed navee85 closed 5 years ago
Thanks for bringing this up! I've known the problem for quite some time now, and I think it's time that I address it. I'll work on this soon!
Implemented #14 with 7e9877a0187e88c3d96372e2d06cdecc6db87254
Hello, I have this problem now, could this be someting related to the server time?
That's the likely cause, yes! You can verify a token with leeway to give the verification more "room": https://github.com/kreait/firebase-tokens-php#verify-an-id-token
Yeah, I fixed it, server time was 20 minutes in the past, thanks for the return tho
i'm still getting wired error when test token in postman it works fine but when it is sent from client side angular it return this error:
The value 'eyJhbGciOiJSUzI...' is not a verified ID token:\n- - The token was issued in the future\n
my code :
$auth = app('firebase.auth');
try {
return $auth->verifyIdToken($this->verifierId);
} catch (FailedToVerifyToken $e) {
throw new InvalidTokenException($e->getMessage(),$e->getCode());
}
any solution plz
I am trying to verify the firebase token but sometimes, it is throwing token issued at future timestamp error, as in the following exception:
I debugged the the code, and I saw the following rows are the problem:
The difference is between the auth_time and time() only a few seconds.