Does anyone know how to use Brickred Socialauth API 4.3 in servlets with Google Oauth 2.0? Where could I get the *consumer_secret* and *consumer_key*?
Was using the API successful at your side?
The instructions available on the BrickRed wiki no longer work as you have already found out. The following should work assuming:
A. You are using socialauth 4.2+. I tested these with socialauth 4.4.
B. You are trying to configure your own domain and not using the brickred domain for testing.
C. You are creating a web application, else adjust accordingly
http://YOUR_HOST_NAME/socialauth.html
)<prop key="www.google.com.consumer_key">opensource.brickred.com</prop>
<prop key="www.google.com.consumer_secret">YC06FqhmCLWvtBg/O4W/aJfj</prop>
<prop key="googleapis.com.consumer_key">CLIENT ID created in Step 1.e above</prop>
<prop key="googleapis.com.consumer_secret">Client Secret created in Step 1.e above </prop>
If you are not using Spring, modify oauth_consumer.properties
Modify the link in your application where the user clicks on to start the contacts import process:
change?id=google
to
?id=googleplus
Hope this helps
You can register your app to use Google OAuth at:
https://developers.google.com/accounts/docs/OAuth2Login#registeringyourapp
from where you get your "secret / key".
I have successfully implemented SocialAuth with Facebook and it worked properly. I still don't have any experience implementing it with google OAuth2 but it should work. Their CDI example does authenticate with Google, I am just not sure if using Oauth1 or Oauth2.
Regards.
For people who cannot find the consumer_secret, I found a solution:
socialauth is using web flow. So if you are socialauth-android you need to create web application instead of installed application.
So even for an Android App, you still need create a Client ID for web project. The secret will be displayed in page directly!