Coder Social home page Coder Social logo

flask-simpleoauth's Introduction

Flask-SimpleOAuth

Presenting a simple Flask OAuth 1.0a provider built on rauth's battle-tested signing logic.

Because OAuth doesn't have to be hard...

Setup

You're going to need MongoDB setup on your platform. If you're using OS X and brew you could do this:

$ brew install mongo

Once you've got MongoDB the necessary Python packages can be installed like so:

$ pip install -r requirements.txt

Okay you're all set. You can run it now, with any luck:

$ python runner.py

Now visit http://localhost:5000/user/new in your browser and get to work...you probably also want to set up a consumer app here: http://localhost:5000/apps/new.

Rationale

Flask-SimpleOAuth is opinioated because OAuth providers generally need to make assumptions about things like user models. This makes providers a tough nut to abstract. For this reason, I've created this as a demonstration of what's possible and to maybe also give you a foundation for your own projects.

The idea here is to show you how you could organize a Flask project to support OAuth and demonstrate how easy it is to is to use rauth's robust signing logic outside of its client scope. (In the future, look for this to be split out into its own package.)

For these reasons, the frontend, the models, and anything else that wasn't essential to "making it work" was left fairly barren. I want to leave these rough edges as an open invitation for others to round out their own implementations. And I hope that things like the MongoEngine documents might be, with minimal pain, swapped out for whatever you like.

Disclaimer

This is a work-in-progress and significant changes may occur without notice.

flask-simpleoauth's People

Contributors

maxcountryman avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.