We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
My server implementation is completely stateless (I am using Dropwizard). I am unable to login to Twitter because of this.
For Facebook, I am able to do this by recreating the accessGrant and then connecting the AuthProvider.
accessGrant = lAuthManager.createAccessGrant(providerId, authorizationCode, lRedirectUrl); AuthProvider provider = lAuthManager.connect(accessGrant);
Where, providerId = facebook authorizationCode = access token from facebook lRedirectUrl = the url to redirect to after successful authentication
However, for twitter, this doesnt work. I have to recreate the accessGrant using the params map
accessGrant = lAuthManager.createAccessGrant(providerId, lParams, lRedirectUrl);
Where, providerId = twitter lParams = Parameter map consisting of requestToken (oauth_token) and oauth_verifier lRedirectUrl = callback URL
It looks like OAuth1 implementation is stateful and requires SocialAuthManager to be persisted to the session.
I created a Stateless implementation of OAuth1 here - https://github.com/onerandomgig/socialauth/blob/master/socialauth/src/main/java/org/brickred/socialauth/oauthstrategy/StatelessOAuth1.java
and updated the TwitterImpl to use this instead, https://github.com/onerandomgig/socialauth/blob/master/socialauth/src/main/java/org/brickred/socialauth/provider/TwitterImpl.java
I have tested it and it works as expected. Could you please let me know if this works and can be integrated into the main branch.
I have also updated the FacebookImpl to use the latest FB API version - 2.5 https://github.com/onerandomgig/socialauth/blob/master/socialauth/src/main/java/org/brickred/socialauth/provider/FacebookImpl.java
Thanks Prashanth
The text was updated successfully, but these errors were encountered:
Thanks Prashanth,
Looks good to me. Could you please send a pull request ?
Warm regards Abhinav
On Sat, Nov 28, 2015 at 9:14 AM, onerandomgig [email protected] wrote:
Hi, My server implementation is completely stateless (I am using Dropwizard). I am unable to login to Twitter because of this. For Facebook, I am able to do this by recreating the accessGrant and then connecting the AuthProvider. accessGrant = lAuthManager.createAccessGrant(providerId, authorizationCode, lRedirectUrl); AuthProvider provider = lAuthManager.connect(accessGrant); Where, providerId = facebook authorizationCode = access token from facebook lRedirectUrl = the url to redirect to after successful authentication However, for twitter, this doesnt work. I have to recreate the accessGrant using the params map accessGrant = lAuthManager.createAccessGrant(providerId, lParams, lRedirectUrl); Where, providerId = twitter lParams = Parameter map consisting of requestToken (oauth_token) and oauth_verifier lRedirectUrl = callback URL It looks like OAuth1 implementation is stateful and requires SocialAuthManager to be persisted to the session. I created a Stateless implementation of OAuth1 here - https://github.com/onerandomgig/socialauth/blob/master/socialauth/src/main/java/org/brickred/socialauth/oauthstrategy/StatelessOAuth1.java and updated the TwitterImpl to use this instead, https://github.com/onerandomgig/socialauth/blob/master/socialauth/src/main/java/org/brickred/socialauth/provider/TwitterImpl.java I have tested it and it works as expected. Could you please let me know if this works and can be integrated into the main branch. I have also updated the FacebookImpl to use the latest FB API version - 2.5 https://github.com/onerandomgig/socialauth/blob/master/socialauth/src/main/java/org/brickred/socialauth/provider/FacebookImpl.java Thanks Prashanth — Reply to this email directly or view it on GitHub #68.
and updated the TwitterImpl to use this instead,
https://github.com/onerandomgig/socialauth/blob/master/socialauth/src/main/java/org/brickred/socialauth/provider/TwitterImpl.java
I have also updated the FacebookImpl to use the latest FB API version - 2.5
https://github.com/onerandomgig/socialauth/blob/master/socialauth/src/main/java/org/brickred/socialauth/provider/FacebookImpl.java
— Reply to this email directly or view it on GitHub #68.
Sorry, something went wrong.
No branches or pull requests
Hi,
My server implementation is completely stateless (I am using Dropwizard). I am unable to login to Twitter because of this.
For Facebook, I am able to do this by recreating the accessGrant and then connecting the AuthProvider.
accessGrant = lAuthManager.createAccessGrant(providerId, authorizationCode, lRedirectUrl);
AuthProvider provider = lAuthManager.connect(accessGrant);
Where,
providerId = facebook
authorizationCode = access token from facebook
lRedirectUrl = the url to redirect to after successful authentication
However, for twitter, this doesnt work. I have to recreate the accessGrant using the params map
accessGrant = lAuthManager.createAccessGrant(providerId, lParams, lRedirectUrl);
Where,
providerId = twitter
lParams = Parameter map consisting of requestToken (oauth_token) and oauth_verifier
lRedirectUrl = callback URL
It looks like OAuth1 implementation is stateful and requires SocialAuthManager to be persisted to the session.
I created a Stateless implementation of OAuth1 here - https://github.com/onerandomgig/socialauth/blob/master/socialauth/src/main/java/org/brickred/socialauth/oauthstrategy/StatelessOAuth1.java
and updated the TwitterImpl to use this instead,
https://github.com/onerandomgig/socialauth/blob/master/socialauth/src/main/java/org/brickred/socialauth/provider/TwitterImpl.java
I have tested it and it works as expected. Could you please let me know if this works and can be integrated into the main branch.
I have also updated the FacebookImpl to use the latest FB API version - 2.5
https://github.com/onerandomgig/socialauth/blob/master/socialauth/src/main/java/org/brickred/socialauth/provider/FacebookImpl.java
Thanks
Prashanth
The text was updated successfully, but these errors were encountered: