Open yanlong-li opened 3 years ago
Im getting Wrong number of segments in ~/path/JWT.php:19 do you know the possible cause the resolution?
cc909e6fa3db1432e87ac3c9928689ffb.0.nzsr.EKSlK7mA1jOIunx6hXbt1g < this is an example identity token in getting from the iOS client
I did not get your fork working and I can't Chinese, so I made my own. See: https://github.com/TipiT/php-apple-signin and https://packagist.org/packages/tipi/php-apple-signin
As a suggestion, I recommend defining the JTW.php and JWK.php from Vendor folder as a dependency to composer.json to use https://github.com/firebase/php-jwt from which they are copy-pasted anyway. This way they stay up-to-date. In this case it adds the support for ES256 algorithm and resolves https://github.com/GriffinLedingham/php-apple-signin/issues/12.
Feel free to see and use my approach. I only tested it in production. :)
I did not get your fork working and I can't Chinese, so I made my own. See: https://github.com/TipiT/php-apple-signin and https://packagist.org/packages/tipi/php-apple-signin
As a suggestion, I recommend defining the JTW.php and JWK.php from Vendor folder as a dependency to composer.json to use https://github.com/firebase/php-jwt from which they are copy-pasted anyway. This way they stay up-to-date. In this case it adds the support for ES256 algorithm and resolves #12.
Feel free to see and use my approach. I only tested it in production. :)
JWT and JWk are custom versions based on dependencies.
cc909e6fa3db1432e87ac3c9928689ffb.0.nzsr.EKSlK7mA1jOIunx6hXbt1g < this is an example identity token in getting from the iOS client
Usually, the token is three paragraphs separated by commas
cc909e6fa3db1432e87ac3c9928689ffb.0.nzsr.EKSlK7mA1jOIunx6hXbt1g < this is an example identity token in getting from the iOS client
It is understood that identityToken
should be used instead of access_token
@Yanlong-LI does your fork solve this problem too? https://github.com/GriffinLedingham/php-apple-signin/issues/5
When I encountered problems, I noticed that the manager of the project had not been maintained for a long time, resulting in many unsolved problems, and the submitted pull requests could not be processed in time. Now I have created a new fork to solve the problems I encountered and solve the problems in the current issues, including #11 #12 #20 #9 #7 , which can be replaced safely. If there are new problems, they will be corrected in time.
https://github.com/Yanlong-LI/php-apple-signin
https://packagist.org/packages/yanlongli/php-apple-signin