{ "info": { "author": "Rick Lentz", "author_email": "rlentz@amfam.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: Implementation :: CPython" ], "description": "# Dash Google Auth Email\n\nDash Google Auth Email is a simple library using Google OAuth to authenticate and\nview a [Dash](https://dash.plot.ly/) app. This project is almost entirely sourced from the parernt project [dash-google-auth](https://github.com/lchapo/dash-google-auth)\n\nThis Library uses [Flask Dance](https://github.com/singingwolfboy/flask-dance)\nand a modified version of Plotly's own [dash auth](https://github.com/plotly/dash-auth)\nfor authentication.\n\n## Basic Use\n\nAuthentication can be added to your Dash application using the `GoogleOAuth`\nclass, i.e.\n\n```python\nfrom dash import Dash\nfrom flask import Flask\nfrom dash_google_auth_email import GoogleOAuth\n\nserver = Flask(__name__)\nserver.config.update({\n 'GOOGLE_OAUTH_CLIENT_ID': ...,\n 'GOOGLE_OAUTH_CLIENT_SECRET': ...,\n})\n\napp = Dash(__name__, server=server, url_base_pathname='/', auth='auth')\n\nauthorized_emails = [...]\nadditional_scopes = [...]\nauth = GoogleOAuth(app, authorized_emails, additional_scopes)\n\n# your Dash app here :)\n...\n```\n\n## Example\nSteps to try this out yourself:\n\n1. Install the `dash-google-auth-email` library using `pip`:\n\n ```bash\n $ pip install dash-google-auth-email\n ```\n\n2. Follow the [Flask Dance Guide](http://flask-dance.readthedocs.io/en/latest/quickstarts/google.html)\n to create an app on the google admin console\n\n3. Make a copy of [app.py](https://github.com/ricklentz/dash-google-auth-email/blob/master/app.py)\n and set the variables (or set the corresponding environment variables):\n ```python\n server.config[\"GOOGLE_OAUTH_CLIENT_ID\"] = ...\n server.config[\"GOOGLE_OAUTH_CLIENT_SECRET\"] = ...\n ```\n with values from the Google OAuth 2 client you should have set up in step 1.\n If you've set these up properly, you can find them at\n [APIs & Services > Credentials](https://console.developers.google.com/apis/credentials)\n under the section **OAuth 2.0 client IDs**.\n\n4. Replace `authorized_emails` in `app.py` with whatever\n Google emails you want to grant access to your app. In production, I'd\n recommend getting these from a database instead.\n\n5. Run `python app.py` and open [localhost](http://localhost:8050/) in a\n browser window to try it out! If the app loads automatically without\n prompting a Google login, that means you're already authenticated -- try\n using an incognito window in this case if you want to see the login\n experience for a new user.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ricklentz/dash-google-auth-email", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "dash-google-auth-email", "package_url": "https://pypi.org/project/dash-google-auth-email/", "platform": "", "project_url": "https://pypi.org/project/dash-google-auth-email/", "project_urls": { "Homepage": "https://github.com/ricklentz/dash-google-auth-email" }, "release_url": "https://pypi.org/project/dash-google-auth-email/1.9.99/", "requires_dist": null, "requires_python": "", "summary": "Dash Google Auth Email", "version": "1.9.99" }, "last_serial": 5199570, "releases": { "0.19.99": [ { "comment_text": "", "digests": { "md5": "147a37a88534b763cd4e51430bfcaff6", "sha256": "fe6ebe85ac29f36dee807d302c57b367ce1efd7dd01f4765af13334a36bf17ef" }, "downloads": -1, "filename": "dash-google-auth-email-0.19.99.tar.gz", "has_sig": false, "md5_digest": "147a37a88534b763cd4e51430bfcaff6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6831, "upload_time": "2019-04-28T12:00:12", "url": "https://files.pythonhosted.org/packages/f1/d0/7342080eeb839386c91425a1b1846ec1c78a5993c0808373ed000f320549/dash-google-auth-email-0.19.99.tar.gz" } ], "1.9.99": [ { "comment_text": "", "digests": { "md5": "02e07d8591f56171f2c3a9b5dafa8e3c", "sha256": "fce551287d1c99a201d8ac81b8b2a9bce4adf5433b5dc67a722a3c8367e144c9" }, "downloads": -1, "filename": "dash-google-auth-email-1.9.99.tar.gz", "has_sig": false, "md5_digest": "02e07d8591f56171f2c3a9b5dafa8e3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6828, "upload_time": "2019-04-28T12:07:07", "url": "https://files.pythonhosted.org/packages/fd/41/7745cbffd2bd3022cf9197f68e177d5bcbb1cde520ed1448fcfe8e354116/dash-google-auth-email-1.9.99.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "02e07d8591f56171f2c3a9b5dafa8e3c", "sha256": "fce551287d1c99a201d8ac81b8b2a9bce4adf5433b5dc67a722a3c8367e144c9" }, "downloads": -1, "filename": "dash-google-auth-email-1.9.99.tar.gz", "has_sig": false, "md5_digest": "02e07d8591f56171f2c3a9b5dafa8e3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6828, "upload_time": "2019-04-28T12:07:07", "url": "https://files.pythonhosted.org/packages/fd/41/7745cbffd2bd3022cf9197f68e177d5bcbb1cde520ed1448fcfe8e354116/dash-google-auth-email-1.9.99.tar.gz" } ] }