Skip to content

Files

Latest commit

 

History

History
72 lines (38 loc) · 2.61 KB

README.md

File metadata and controls

72 lines (38 loc) · 2.61 KB

Basic OAuth 2.0 Support for Web.py

Implement basic OAuth 2.0 support for web.py. Inspired by simpleauth.

Supported providers:

Dependency

Usage & Example

  1. Create app & get client id/secret from providers. (Google: Google Cloud Console, Facebook: Facebook Developers)

  2. Put auth.py in your project root dir, and also add your project root dir to sys path. auth.py handles OAuth 2.0 process for you, and you do not need to modify this script.

  3. In you main python script, create a request handler by subclassing auth.handler. Set url routing and client id/secret. Please refer to login.py for a complete example.

  4. You can run the example (remember to modify app id/secret and callback_uri function in the exmaple) by the following bash command:

$ python login.py

References

Other

This project is released in public domain, see UNLICENSE