Hacker News new | past | comments | ask | show | jobs | submit login
OAuth2 in Python [pdf] (goodcode.io)
30 points by nmundar on Feb 10, 2014 | hide | past | favorite | 10 comments



Fun fact: python-oauth2 does not support oauth2. Despite its name (similar names like httplib2, urllib3)

https://github.com/simplegeo/python-oauth2/issues/92


This is true, the article does not use python-oauth2 though. It shows how to do the flow manually...well using requests. :)


Yeah this is the future! Literally!

Look the last change date in the pdf: http://goodcode.io/wp-content/uploads/2012/06/OAuth-edited.p...


Ooops. There goes our time machine secret...

Fixed, thanks for pointing it out.


This isn't a guide for Python programmers. It's a guide for Django programmers.


Django 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."


Django 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.


I 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.


This 'guide' doesn't address refresh tokens at all.


GitHub and Facebook don't use refresh tokens. Token lifetime is covered and guide explicitly states in intro that it uses GitHub and Facebook services.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: