st4lk / django-rest-social-auth

OAuth signin with django rest framework
MIT License
521 stars 122 forks source link

Not clear how to use it #91

Closed vovkd closed 5 years ago

vovkd commented 5 years ago

Maybe i've i just missed something from the docs, but how i suppose to use it? 1) First. Get acces token from oauth provider 2) Send this token to /social/token_user/ 3) Backend will authenticate user and return some data

Is it correct?

I've tested this with vk.com: 1) created vk app 2) received auth code from vk.com 3) POSTed it to /social/token_user/ provider=vk-oauth2 code=xxxxxxxx 4) received (social_core.exceptions.AuthForbidden: Your credentials aren't allowed) What i do wrong? or maybe i've misread something in the docs?

st4lk commented 5 years ago

Haven't looked into details yet, but strictly speaking this is not correct:

First. Get acces token from oauth provider

Current util expect code as input, not access token

vovkd commented 5 years ago

My bad. Yes, i mean "auth code". As i've found out problem was with Twitter itself. Thanks.