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

Twitter Authentication - Different logic with email not provided #3

Open
TomClarkson opened this issue Apr 9, 2014 · 6 comments
Open

Comments

@TomClarkson
Copy link

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

@adamwathan
Copy link
Owner

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!

@adamwathan
Copy link
Owner

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.

@abhimanyu003
Copy link

+1 Yes Laravel Socialite as dependency would be great

@degrovejazz
Copy link

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!

@JonathanBruce
Copy link

+1 This package is great, thanks so much. Can't wait for twitter support.

@prio101
Copy link

prio101 commented Jan 17, 2016

cant wait for twiiter support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants