-
Notifications
You must be signed in to change notification settings - Fork 940
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
Sign in with apple id #369
Comments
So you should prob. create the issue in that package instead https://github.com/SocialiteProviders/Providers or just create your own package with it. |
@olivernybroe I realize that this is in the readme but I suspect that this will be such a widely adopted adapter so we could maybe consider adding it in. Might need https://developer.apple.com/documentation/signinwithapplejs ? |
Feel free to PR. |
This PR to SocialiteProviders/Providers might be a good starting point. |
The email address will be available soon, see issue: We need to wait after the update from Apple, but we could implement this @jbrooksuk #371 (comment) Shall I make a PR from your repo @pxgamer https://github.com/pxgamer/socialite/tree/feature/apple-provider Perhaps a suggestion for the socialite documentation from apple with there anonymous-email-feature:
Update From #371 message @pxgamer, will start a PR from his repo and snippet @jbrooksuk |
The snippet has been implemented see theodh@bc70f9a |
I think it's probably worth waiting until the update by Apple. It might be worth removing commit 248c0ce though as this is IDE-specific and probably should be in your global ignore (correct me if I'm wrong though)? Also, can the abstract |
Removed the .idea and reversed to scope name+email
Good point! The override on the user method in the AppleProvider could cause maintenance issues. Because the AppleProvider is an exception on this method we could introduce a smaller override and we keep the abstract. I was thinking about a strategy pattern, but that is an overkill. We could also introduce an extra method. Then we don't have to change the other providers and I only need to override this new function in the AppleProvider: AbstractProvider.php:
We should think about this, other ideas :) |
The apple clientsecret key has an expiration (max 6 months). All users should maintain or use a script like https://github.com/aaronpk/sign-in-with-apple-example/blob/master/client-secret.rb This is needed to maintain the laravel services.apple.clientsecret config value. We'll get security issues if we create this automatically (but it is possible I saw some php composer libraries to create this key). Security problem: someone is snitching the apple private key. In that case the developer should use an external script and create a file with the clientsecret with an expire date (example: in the storage/framework path). Or is this out of scope? |
Status update: from https://forums.developer.apple.com/thread/118209
Current issues:
It's all beta, shall we put this issue onhold until they change issue 3 |
@theodh yeah we're not gonna implement anything until the final release. |
Good point, other view, we should test this in some environments. I'm already having this provider in the production environment. I'm also monitoring the log. My suggestion a beta-branch in your repo, or that other developers could use a VCS to mine. Laravel app: composer.json Change require:
Add
I need some testers 💂♂️ 🎺 Notes:
|
@theodh, which branch are you using? |
@pxgamer apple-issue-369 |
Status update: apple revoked the feature that it is possible to handle a GET-request with the auth-token. In my production environment I created a custom subroutine without laravel/socialite. We need to handle (security etc) that a post request from host appleid.apple.com is allowed in the laravel framework. A lot of developers asked to apple to get this feature back... |
Hello people, any updates on this issue? |
What needs to happen or where can I help to move this forward? |
I managed to use this tutorial to do a quick and dirty test: Since this documentation is almost useless: https://developer.apple.com/documentation/signinwithapplerestapi, I dug into these also: From what I can tell beside the issues identified by the people above, main issue (beside getting name and email only at first call) is the creation of the client_secret from the private key obtained from Apple At this moment I try to put everything together and build a custom piece (without passport/socialite/etc) of code that will handle just the token verification (because it's an API) (the other part will be handled from a mobile app) |
I also saw this passing by on Twitter, not sure if it's relevant: https://openid.net/2019/09/30/apple-successfully-implements-openid-connect-with-sign-in-with-apple/ |
Indeed @alinmiron @driesvints, also made custom routines to handle the social, this is an odd duck... It is not the socialite code implementation (see draft #396) but the side-effects in the laravel framework: We could implement the draft PR, but we should make a documentation about the side-effects in the framework. We could make a note in the documentation? The laravel framework developer should
If we're going further, still need testers, made a small update, had no time to test the code: |
Made an example of how the socialite of apple can be used. Also tested the PR and it works! :) |
I've taken a quick look over the example provided, seems ok.
First, I check to see if there is a value for a CLIENT_SECRET .env variable. If it's not, I call the above method and generate the client_secret then I'm writing it in the .env variable.
if the client_secret is expired, I'll regenerate using the same method above. |
Hi @theodh. I was able to test your example. Everything looks good! Since iOS 13 was released on 19th of September this should be merged, I think Apple will push the "Sign in with Apple" as a privacy-focused alternative to the existing 3rd party sign in methods (google, facebook ...) . IMHO the only big issue will be the e-mail sending if the users login with anonymous e-mail address, but this is more like a configuration issue (registration of domain/email addresses with apple). The client_secret generation can be handled easy. Also few mentions from here should be added to the Readme file and we should be good to go. |
Hi @alinmiron thank you for testing the example! Also put your reference of your php client secret solution in the example. Indeed now iOS 13 has been released, this issue has been resolved. |
Looks like Taylor decided he doesn't wants to take on the maintenance burden after all which is understandable. Feel free to pr this to SocialiteProviders. |
For anyone looking for this functionality, I have created a socialite package for this, which extended functionality specific for SIWA: https://github.com/GeneaLabs/laravel-sign-in-with-apple. Hope this is useful. |
Since the announcement of sign in with apple id. It'd be good to have it as a socialite provider for sign in with apple.
https://developer.apple.com/sign-in-with-apple/
The text was updated successfully, but these errors were encountered: