Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Sign in with Apple third party provider #808

Open
wants to merge 1 commit into
base: master
from

Conversation

@AndreiIgna

This comment has been minimized.

Copy link

AndreiIgna commented Oct 30, 2019

The League OAuth2 Client supports PHP >= 5.6, but this provider does not. Saw the dependency https://github.com/web-token/jwt-framework/ requires at least 7.2

Unfortunately there's still websites using PHP lower than 7.2. I'm using OAuth 2 Client and providers in a WordPress plugin, and these sites are really slow to update their servers.. Is there a way to make Apple Sign in provider be compatible with PHP 5.6?

@patrickbussmann

This comment has been minimized.

Copy link
Author

patrickbussmann commented Oct 30, 2019

I already made it 7.1 compatible, @AndreiIgna 😅

The main problem here is the JWT Generation which we need for Apple's client_secret.
Apple use's a Elliptic Curve Digital Signature Algorithm (ECDSA) with the P-256 curve and the SHA-256 hash algorithm.
There are many users which have invalid_client problems because they not generating this client_secret in the right way.
As you can read here: https://forums.developer.apple.com/community/app-frameworks/sign-in-with-apple
For example (NodeJS): https://forums.developer.apple.com/thread/125074
Or (PHP): https://forums.developer.apple.com/message/381848

I can check if I can build a own implementation of this generation and hope that it's usable for PHP 5.6. But for now this library is the only one I find.
I already checked few others but none works.

Similar problems:
https://stackoverflow.com/q/52214433/1362858

I'll try this soon: https://www.zenstruck.com/projects/php-jwt
Maybe it's working. Then we are compatible with 5.6.

Let's hope.

@patrickbussmann

This comment has been minimized.

Copy link
Author

patrickbussmann commented Oct 31, 2019

OK @AndreiIgna I was successfull.
Travis is building 0.2.0 with PHP 5.6 successfully. 🎉

So it's now fully compatible with PHP 5.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.