dheerajwebdior / socialauth-android

Automatically exported from code.google.com/p/socialauth-android
0 stars 0 forks source link

Create Own Provider Issue #134

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hello. I try to create own Provider (for Russian social networks VKontakte and 
Odnoklassniki) through oAuth2 , like described in this thread. But any way I 
get error " is not a provider or valid OpenId URL". What kind of steps I doing 
wrong?

StackTrace:

D/SocialAuthAdapter﹕ Selected provider is
D/SocialAuthAdapter﹕ Loading keys and secrets from configuration
I/SocialAuthConfig﹕ Loading application configuration
D/SocialAuthAdapter﹕ Starting webview for authentication
D/SocialAuthError﹕ org.brickred.socialauth.exception.SocialAuthException: is 
not a provider or valid OpenId URL
W/System.err﹕ org.brickred.socialauth.android.SocialAuthError: URL 
Authentication error
W/System.err﹕ at 
org.brickred.socialauth.android.SocialAuthAdapter$4.run(SocialAuthAdapter.java:6
48)
W/System.err﹕ at java.lang.Thread.run(Thread.java:856)

"assets/oauth_consumer.properties" part for VKontakte:

#VKontakte
socialauth.vkontakte = org.brickred.socialauth.provider.GenericOAuth2Provider
vkontakte.consumer_key = 4117468
vkontakte.consumer_secret = tj9LhYsNJliE1w6IwtDM
vkontakte.custom_permissions = wall,groups,photos,offline
vkontakte.authentication_url = https://oauth.vk.com/authorize
vkontakte.access_token_url = https://oauth.vk.com/access_token

Can You help me or I need to use different oAuth library like KateSDK ? It's 
bad for me, I just want one style type auth in my app.
Waiting for Your answer ASAP. Thank You.
[ https://github.com/3pillarlabs/socialauth-android/issues/3 ]

Original issue reported on code.google.com by CCM...@gmail.com on 14 Jan 2014 at 8:58

GoogleCodeExporter commented 8 years ago
Hi,

never provide your keys and secrets on open forum. it can be misused. Check 
this post if it can help you and let me know. 

https://github.com/3pillarlabs/socialauth-android/wiki/Create-Own-Social-Network
-Provider

Original comment by vineet.a...@3pillarglobal.com on 14 Jan 2014 at 1:01

GoogleCodeExporter commented 8 years ago
NP. It's just test key doesn't matter.
I say that I do all like described in this thread ( 
https://github.com/3pillarlabs/socialauth-android/wiki/Create-Own-Social-Network
-Provider ) . But this error... 

Original comment by CCM...@gmail.com on 14 Jan 2014 at 1:05

GoogleCodeExporter commented 8 years ago
Hi try to run without providing custom permissions. Let's check are you able to 
authenticate.

Original comment by vineet.a...@3pillarglobal.com on 14 Jan 2014 at 1:07

GoogleCodeExporter commented 8 years ago
Where I can get example for use Your lib "without providing custom 
permissions", just directly?

Original comment by CCM...@gmail.com on 14 Jan 2014 at 1:09

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
All this credentials works good with direct oAuth or if I use different lib 
(kateVk for ex.) 

Original comment by CCM...@gmail.com on 14 Jan 2014 at 1:13

GoogleCodeExporter commented 8 years ago
Remove this line

vkontakte.custom_permissions = wall,groups,photos,offline

Original comment by vineet.a...@3pillarglobal.com on 14 Jan 2014 at 1:13

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Unfortunately it's doesn't help. Same error. =(

Original comment by CCM...@gmail.com on 14 Jan 2014 at 1:25

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
It's have a easy solution. Just in activity:

    SocialAuthAdapter.Provider vkontakteProvider = SocialAuthAdapter.Provider.GENERIC;
    vkontakteProvider.setName("vkontakte");
    vkontakteProvider.setCallBackUri("https://oauth.vk.com/blank.html");
    socialAuthAdapter.addProvider(vkontakteProvider, R.drawable.vkontakte);

Make sure what drawable resource has same name with Provider. 
Thank You for nothing. =)

Original comment by CCM...@gmail.com on 20 Jan 2014 at 11:51

GoogleCodeExporter commented 8 years ago

Original comment by vineet.a...@3pillarglobal.com on 23 Jan 2014 at 6:46

GoogleCodeExporter commented 8 years ago

Original comment by l...@3pillarglobal.com on 24 Mar 2014 at 7:46