6 ms·
OAuth2 in Python [pdf]
- elicox 13y agoYeah this is the future! Literally! Look the last change date in the pdf: http://goodcode.io/wp-content/uploads/2012/06/OAuth-edited.pdf http://goodcode.io/wp-content/uploads/2012/06/OAuth-edited.p...
- senko 13y agoOoops. There goes our time machine secret... Fixed, thanks for pointing it out.
- est 13y agoFun fact: python-oauth2 does not support oauth2. Despite its name (similar names like httplib2, urllib3) https://github.com/simplegeo/python-oauth2/issues/92 https://github.com/simplegeo/python-oauth2/issues/92
- denibertovic 13y agoThis is true, the article does not use python-oauth2 though. It shows how to do the flow manually...well using requests. :)
- kordless 13y agoThis 'guide' doesn't address refresh tokens at all.
- nmundar 13y agoGitHub and Facebook don't use refresh tokens. Token lifetime is covered and guide explicitly states in intro that it uses GitHub and Facebook services.
- wyuenho 13y agoThis isn't a guide for Python programmers. It's a guide for Django programmers.
- rplnt 13y agoI hope this won't become a pattern like it is with jquery and javascript. It's virtually impossible to find a proper answer to js-related question. Everyone tells you to use jquery. Similarly, everyone assumes you run your javascript in a browser and so have access to browser-specific objects.
- senko 13y agoDjango is there only to implement the views. You can just as easily use Flask or Pyramid or other framework, but if you want to give a complete example (or indeed, to implement OAuth), you do need to use something (even if that's BaseHTTPServer, if that rocks your boat). Edited to add: Django-only guide would be: "use django-allouth. done."
- nmundar 13y agoDjango is used as a lowest common denominator and guide is not using complex Django features. The only exception could be the singleton model example, but advanced users are probably capable of creating singleton models in their DB of choice. I'm open to suggestions how to create framework-agnostic examples.