{ "info": { "author": "Janusz Skonieczny", "author_email": "js@bravelabs.pl", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "flask-social-blueprint\n======================\n\nAn OAuth based authentication blueprint for flask. Easy to extend and\noverride.\n\nhttps://github.com/wooyek/flask-social-blueprint\n\n.. image:: https://travis-ci.org/wooyek/flask-social-blueprint.svg\n\n.. image:: https://coveralls.io/repos/wooyek/flask-social-blueprint/badge.svg?branch=develop&service=github \n :target: https://coveralls.io/github/wooyek/flask-social-blueprint?branch=develop\n\n.. image:: https://img.shields.io/pypi/v/flask-social-blueprint.svg?maxAge=2592000 \n :target: https://pypi.python.org/pypi/flask-social-blueprint/ \n\n.. image:: https://img.shields.io/pypi/dm/flask-social-blueprint.svg?maxAge=2592000 \n :target: https://pypi.python.org/pypi/flask-social-blueprint/\n\nDemo\n----\n\nBased on ``example/gae`` codebase with secret ``settings_prd.py``\nprovided for proper OAuth providers configuration.\n\nhttp://flask-social-blueprint.appspot.com/\n\nWhy?\n----\n\nThere is `Flask-Social`_ extension, but is painfully interconnected and\nto change anything you basically have to fork and rewrite portions of\nit.\n\nNot to mention that it requires POST request on social login endpoints.\nI hate that I need to write an inline forms to create a login button.\n\nHow it\u2019s any better?\n--------------------\n\nThis blueprint plays nicely with `Flask-Security`_ and it\u2019s easily\noverridable without forking everything, it\u2019s `plain simple OOP`_ not that\n`module based provider`_ `function search crap`_.\n\nTo extend it just write a provider class anywhere you want, and setup\nit\u2019s client id and secret in the flask settings providing an import path\nlike this:\n\n.. code:: python\n\n SOCIAL_BLUEPRINT = {\n # https://developers.facebook.com/apps/\n \"flask_social_blueprint.providers.Facebook\": {\n # App ID\n 'consumer_key': '197\u2026',\n # App Secret\n 'consumer_secret': 'c956c1\u2026'\n },\n # https://apps.twitter.com/app/new\n \"flask_social_blueprint.providers.Twitter\": {\n # Your access token from API Keys tab\n 'consumer_key': 'bkp\u2026',\n # access token secret\n 'consumer_secret': 'pHUx\u2026'\n },\n # https://console.developers.google.com/project\n \"flask_social_blueprint.providers.Google\": {\n # Client ID\n 'consumer_key': '797\u2026.apps.googleusercontent.com',\n # Client secret\n 'consumer_secret': 'bDG\u2026'\n },\n # https://github.com/settings/applications/new\n \"flask_social_blueprint.providers.Github\": {\n # Client ID\n 'consumer_key': '6f6\u2026',\n # Client Secret\n 'consumer_secret': '1a9\u2026'\n },\n }\n\nDone!\n\nWhat\u2019s missing?\n---------------\n\nThis is just authentication blueprint there is no templates, models and\nstuff that you would want to customize yourself.\n\nWhat to do more?\n----------------\n\n1. More providers\n2. Make Flask-Security dependency optional\n\nExamples\n--------\n\nThe core of this module has no GUI, but examples have a nice login\nand profile page to show it it works. Checkout the `demo`_.\n\n.. image:: https://github.com/wooyek/flask-social-blueprint/raw/master/docs/login-form.png\n :alt: Flask social blueprint login form example\n :align: center\n\n\n.. image:: https://github.com/wooyek/flask-social-blueprint/raw/master/docs/user-profile.png\n :alt: Flask social blueprint user profile example\n :align: center\n\nThe example has a working model and templates, has a bunch of\ndependencies like `Flask-SLQAlchemy`_, you can take it as a wire frame\nmodify and build your app with that.\n\nExamples are made from some existing apps, they may contain more stuff\nthat\u2019s really needed to showcase this module. When in trouble just ask\nquestions.\n\nOr just drop in this solution inside your working Flask app. It should\nnot create any conflicts with existing stuff. You maybe required to\nwrite an adapter for your User model and SocialConnection model (or\nsimilar) but that\u2019s 3 functions for the adapter. All User model\nrequirements come from `Flask-security`_.\n\n1. for `SQLAlchemy `_\n2. for `Google App Engine `_\n3. for `MongoDB `_\n\n\nDevelopment environment with Vagrant\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nYou can always use our `vagrant`_. It should set up everything needed for tests or\ndevelopment. This should set up everything you need:\n\n.. code:: sh\n\n vagrant up --provision\n\nThe code will be kept in ``/vagrant/`` directory.\nYou have will get 3 python virtual enviroments setup:\n\n* gae \u2013 for gae example\n* sqla \u2013 for sqla example\n* mongodb \u2013 for mongodb example\n\nActivate one of them using `virtualenvwrapper`_. For example to activate mongodb:\n\n.. code:: sh\n\n workon mongodb\n python /vagrant/example/mongodb/main.py\n\nGoogle App Engine example have to be run little bit different, \nit needs GAE development server layer wrapping Flask.\n\n.. code:: sh\n\n workon gae\n python ~/google_appengine/dev_appserver.py --host 0.0.0.0 --port 5055 /vagrant/example/gae/\n\nWhen you develope with and without vagrant because please remeber that `flask-social-blueprint/example/gae/lib/`\nwill be shared between machines, it may cause problems.\n\nSetup OAuth with different providers\n------------------------------------\n\nThis blueprint needs client id's and secrets provided by social services you\nwant to integrate with, here's where you setup them.\n\nIn examples we use http://dev.example.com:5055 URL to overcome limitations\nposed on `localhost` and `127.0.0.1` when setting up integrations.\nThe http://example.com URL is guaranteed to be valid and may be used by\nanyone in demos and documentation. Just map `dev.example.com` to `127.0.0.1`\nand you're good to go.\n\nCallback URLs use the name of the provider at the end.\nObtain client ids and secrets from OAuth providers using\nmain URL http://dev.example.com:5055 and callbacks URLS like these:\n\n- http://dev.example.com:5055/_social/callback/Google\n- http://dev.example.com:5055/_social/callback/Facebook\n- http://dev.example.com:5055/_social/callback/Twitter\n- http://dev.example.com:5055/_social/callback/Github\n\nTwitter\n^^^^^^^\n\nCreate new application here: https://apps.twitter.com/app/new\n\nGoogle\n^^^^^^\n\n1. Create new project here: https://console.developers.google.com/project\n2. In APIs & auth > Credentials create Client ID\n3. Update consent screen details, at least product name, home page and email address\n4. Enable Google+ API\n\nGitHub\n^^^^^^\n\nCreate new application here: https://github.com/settings/applications/new\n\nFacebook\n^^^^^^^^\n\nCreate new application here: https://developers.facebook.com/apps/\n\nSetup `Valid OAuth redirect URIs` in Settings > Advanced > Security\n\n\n.. _Flask-Social: https://pythonhosted.org/Flask-Social/\n.. _Flask-Security: https://pythonhosted.org/Flask-Security/\n.. _Flask-SLQAlchemy: https://pythonhosted.org/Flask-SQLAlchemy/\n.. _demo: http://flask-social-blueprint.appspot.com/\n.. _plain simple OOP: src/flask_social_blueprint/providers.py\n.. _module based provider: https://github.com/mattupstate/flask-social/blob/develop/flask_social/core.py#L127\n.. _function search crap: https://github.com/mattupstate/flask-social/tree/develop/flask_social/providers\n.. _virtualenvwrapper: http://virtualenvwrapper.readthedocs.org/en/latest/\n.. _vagrant: https://www.vagrantup.com/", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/wooyek/flask-social-blueprint", "keywords": "flask social oauth authentication", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "flask-social-blueprint", "package_url": "https://pypi.org/project/flask-social-blueprint/", "platform": "", "project_url": "https://pypi.org/project/flask-social-blueprint/", "project_urls": { "Homepage": "https://github.com/wooyek/flask-social-blueprint" }, "release_url": "https://pypi.org/project/flask-social-blueprint/0.8.0/", "requires_dist": null, "requires_python": "", "summary": "An OAuth based authentication blueprint for flask. Easy to extend and override", "version": "0.8.0" }, "last_serial": 4248604, "releases": { "0.6.1": [ { "comment_text": "", "digests": { "md5": "fba1ddb881dfc539db2266354e2aaebe", "sha256": "35d8c31e704ae9a1557c3999c9299b004da3671432c23d9c525e46c88a3ac6de" }, "downloads": -1, "filename": "flask-social-blueprint-0.6.1.zip", "has_sig": false, "md5_digest": "fba1ddb881dfc539db2266354e2aaebe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12358, "upload_time": "2014-10-13T13:10:20", "url": "https://files.pythonhosted.org/packages/90/eb/be676e9ddc482d6aba2d893e73effe48d0069e4081e7ddcf9f0bef1be737/flask-social-blueprint-0.6.1.zip" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "ffb375c10252c0d2f73b941bda55a20d", "sha256": "03706e00e8b8cdb413d79ec2be5def04ae40cf6e2a5887be6f7651faae893314" }, "downloads": -1, "filename": "flask-social-blueprint-0.7.zip", "has_sig": false, "md5_digest": "ffb375c10252c0d2f73b941bda55a20d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16150, "upload_time": "2015-01-23T22:14:33", "url": "https://files.pythonhosted.org/packages/50/c0/44b61ea045cd7a6d7ac315f41cdaa60ec1b88184f90fef8586d214130962/flask-social-blueprint-0.7.zip" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "973346af5053f484e11c60db974ae3ca", "sha256": "382732f136de0920adaee2798862689dd5e780a627ca2d96fa9c58edf225bded" }, "downloads": -1, "filename": "flask-social-blueprint-0.7.1.zip", "has_sig": false, "md5_digest": "973346af5053f484e11c60db974ae3ca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16252, "upload_time": "2015-12-05T17:01:27", "url": "https://files.pythonhosted.org/packages/43/72/1a7b37b0a9877b7eacceecfbd1d34eacfd65e94a8c0d69f9c7ab774ec897/flask-social-blueprint-0.7.1.zip" } ], "0.7.2": [ { "comment_text": "", "digests": { "md5": "8e7e066f6bc46f99ffdee9558dafcc1b", "sha256": "97de9b435886c1e672cc65fea7357dcb6748d6c31d03d8309033c8b1bed911c5" }, "downloads": -1, "filename": "flask-social-blueprint-0.7.2.zip", "has_sig": false, "md5_digest": "8e7e066f6bc46f99ffdee9558dafcc1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16511, "upload_time": "2015-12-25T01:24:19", "url": "https://files.pythonhosted.org/packages/c4/f2/245c945765e8c1bb7eb6ca3106dd901b611846637b92972fa57b729a3f13/flask-social-blueprint-0.7.2.zip" } ], "0.8.0": [ { "comment_text": "", "digests": { "md5": "bb98353044cb89dac622dbace12385f5", "sha256": "821051bb285a92eac974c8afdfdef476770eee09a97557566e5c4c67e336bad4" }, "downloads": -1, "filename": "flask-social-blueprint-0.8.0.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "bb98353044cb89dac622dbace12385f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11952, "upload_time": "2018-09-07T14:20:24", "url": "https://files.pythonhosted.org/packages/74/33/3284f86e3875c2dc5e1f11d8bd9835d156b606c7a83aeb2c7a52d5859cf9/flask-social-blueprint-0.8.0.linux-x86_64.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bb98353044cb89dac622dbace12385f5", "sha256": "821051bb285a92eac974c8afdfdef476770eee09a97557566e5c4c67e336bad4" }, "downloads": -1, "filename": "flask-social-blueprint-0.8.0.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "bb98353044cb89dac622dbace12385f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11952, "upload_time": "2018-09-07T14:20:24", "url": "https://files.pythonhosted.org/packages/74/33/3284f86e3875c2dc5e1f11d8bd9835d156b606c7a83aeb2c7a52d5859cf9/flask-social-blueprint-0.8.0.linux-x86_64.tar.gz" } ] }