python - How to redirect back to my app page from github -
i writing view in django take user github , access of repositories , all.
import requests def authenticated_user(request): if request.method == 'get': req = requests.get('https://github.com/login/oauth/authorize', params = { 'client_id': 'something', 'redirect_uri': 'localhost:8000/app/', 'scope': 'user,public_repo,user:email.user:follow', } ) content = req.content return httpresponse(content) this taking me login page problem when logged in, redirects me http://localhost:8000/session instead of http://localhost:8000/app/. tried also
req = requests.get('https://github.com/login/oauth/authorize?client_id=something&redirect_uri=localhost:8000/app&scope=something,something but getting same result. not getting what's problem is. please me. , want know how use "code" oauth2 after logging in.
Comments
Post a Comment