You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, we are trying to use graphql-authentication with Google and we are keep getting this error UnexpectedValueException: Wrong number of segments in /var/www/html/vendor/firebase/php-jwt/src/JWT.php:112
We've noticed there that the id token that Google returns, cannot get verified because it doesn't have the correct format $tks = \explode('.', $jwt); if (\count($tks) !== 3) { throw new UnexpectedValueException('Wrong number of segments'); } list($headb64, $bodyb64, $cryptob64) = $tks;
The token google returns only has two dots, and therefore less than three segments when exploded, so it always fails verification. We also tried to bypass this, only for other issues to appear later on the code. So are not sure where the issue lies. We do not have a redirect url, not sure if that is an issue though. We are using this on a nuxt project, with no success so far. Any help towards the correct direction will be greatly appreciated.
Thanks
Evangelos
The text was updated successfully, but these errors were encountered:
Hello, we are trying to use graphql-authentication with Google and we are keep getting this error
UnexpectedValueException: Wrong number of segments in /var/www/html/vendor/firebase/php-jwt/src/JWT.php:112
We've noticed there that the id token that Google returns, cannot get verified because it doesn't have the correct format
$tks = \explode('.', $jwt); if (\count($tks) !== 3) { throw new UnexpectedValueException('Wrong number of segments'); } list($headb64, $bodyb64, $cryptob64) = $tks;
The token google returns only has two dots, and therefore less than three segments when exploded, so it always fails verification. We also tried to bypass this, only for other issues to appear later on the code. So are not sure where the issue lies. We do not have a redirect url, not sure if that is an issue though. We are using this on a nuxt project, with no success so far. Any help towards the correct direction will be greatly appreciated.
Thanks
Evangelos
The text was updated successfully, but these errors were encountered: