Open TomClarkson opened 10 years ago
Hey Tom, yeah I would love to get a pull request for Twitter support. I know their API works a lot differently than standard OAuth2 providers (I believe the API is OAuth1 and they have some bastardized OAuth2-ish API just for authentication?) so it's definitely going to be a bit of a special case and a bit more work than the other providers.
In regards to the email thing, I think what I would do is just leave the email field in the UserDetails
object as null
, and leave it up to the person using the package to decide if they need the user's email, and then implement something in their app to deal with it separately. What you've suggested is definitely a valid way that someone could go about implementing it. I don't think this package needs to be concerned with solving that problem directly though, so I think just returning a null email address for Twitter auth and adding a note to the docs mentioning that Twitter doesn't give you an email address would be enough.
So yeah, cook up a pull request if you like, would love to get Twitter support going!
Just an update, planning on adding a dependency on the Laravel Socialite package for the next version which will give us Twitter support right out of the box. Hopefully some time in the next few weeks.
+1 Yes Laravel Socialite as dependency would be great
I'm working on an app in Laravel 5 and wanted to use Socialite but found this package much easier to use. Only thing missing is the Twitter auth, which would be great. Thanks for the work on this package!
+1 This package is great, thanks so much. Can't wait for twitter support.
cant wait for twiiter support
This package is excellent.
I notice that there is no Provider for twitter at the moment. Is this something that you would accept a pull request for?
The difficulty with the twitter API is they don't return the users email address so in your app you might not want to add $user->confirmed = false; into the call back and in the controller redirect the user to a complete sign up page where they verify their email and you would have an App::before filter to protect again unconfirmed users. Does this sound about right?
Thanks