st4lk / django-rest-social-auth

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

Difficulty undertanding LinkedIn oauth2 flow #48

Closed pedx78 closed 5 years ago

pedx78 commented 7 years ago

Having problem understanding oauth2 flow on readme

https://github.com/st4lk/django-rest-social-auth#oauth-20-workflow-with-rest-social-auth

  1. Social provider redirects back to redirect_uri with param code.

What is the redirect_uri ? I am not sure what url to register with linkedin. Is it generated by the plugin, or do I have to implement endpoint myself ?

How does one get the returned code ? Does front end call the redirect_uri to retreive the code ? Or server retrieves it and sends to front end ?

Hope above can be clarified

st4lk commented 5 years ago

@pedx78 redirect_uri - is just a URI of your site, that will handle response from social provider. You can keep the default value (/), in that case it will be a root path of your site. Please check the example project.