Spring Social Twitter Auth in one step

250 views Asked by At

I am building a service that needs to manage the user authentication through Twitter API with Spring Social Twitter and return some basic user info such as the email.

The idea will be to make this process with no callbacks (avoiding response.sendRedirect( authorizeUrl );), providing the whole info from the client and letting the server to make the whole stuff.

Is this possible?

1

There are 1 answers

1
Maksym Demidas On BEST ANSWER

There is no way to get user email using Twitter API. You need to ask user to give his email in your application directly.

You can try to simplify OAuth2 dance using implicit flow feature. See these links for more details:

But I am not sure that you can do it without any redirect at all. From Google link it looks like you have redirect in popup option.

Hope it helps.