GriffinLedingham / php-apple-signin

🗝 Decode Apple Sign In client tokens in PHP
BSD 3-Clause "New" or "Revised" License
200 stars 87 forks source link

Undefined property: stdClass::$kid #29

Open 17agustin opened 1 year ago

17agustin commented 1 year ago

While using the package I got an error saying "Undefined property: stdClass::$kid"

It happened in: AppleSignIn\Vendor\JWT::getPublicKeyKid at line 158.

Version: ^1.1 php version: 8.1

The code I'm using:

            $appleSignInPayload = ASDecoder::getAppleSignInPayload($identityToken);

            /**
             * Obtain the Sign In with Apple email and user creds.
             */
            $email = $appleSignInPayload->getEmail();
            $userId = $appleSignInPayload->getUser();

That would be all I'm doing with the package. Should I change something? any help is worthy :)