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

[recommend] The new fork solves most of the current problems #23

Open yanlong-li opened 3 years ago

yanlong-li commented 3 years ago

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

diego-lipinski-de-castro commented 3 years ago

Im getting Wrong number of segments in ~/path/JWT.php:19 do you know the possible cause the resolution?

diego-lipinski-de-castro commented 3 years ago

cc909e6fa3db1432e87ac3c9928689ffb.0.nzsr.EKSlK7mA1jOIunx6hXbt1g < this is an example identity token in getting from the iOS client

TipiT commented 3 years ago

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. :)

yanlong-li commented 3 years ago

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.

yanlong-li commented 3 years ago

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

yanlong-li commented 3 years ago

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

Firman95 commented 3 years ago

@Yanlong-LI does your fork solve this problem too? https://github.com/GriffinLedingham/php-apple-signin/issues/5