{"id":14974217,"url":"https://github.com/lchapo/dash-google-auth","last_synced_at":"2025-07-05T22:33:51.686Z","repository":{"id":62566468,"uuid":"134776593","full_name":"lchapo/dash-google-auth","owner":"lchapo","description":"(Deprecated) Dash Extension for Google OAuth","archived":false,"fork":false,"pushed_at":"2020-10-02T17:30:15.000Z","size":40,"stargazers_count":62,"open_issues_count":8,"forks_count":18,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-01T03:22:08.151Z","etag":null,"topics":["dash","flask","flask-dance","oauth2","plotly"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lchapo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-24T22:53:50.000Z","updated_at":"2024-11-25T15:56:40.000Z","dependencies_parsed_at":"2022-11-03T17:47:33.603Z","dependency_job_id":null,"html_url":"https://github.com/lchapo/dash-google-auth","commit_stats":null,"previous_names":["lucaschapin/dash-google-auth"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lchapo%2Fdash-google-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lchapo%2Fdash-google-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lchapo%2Fdash-google-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lchapo%2Fdash-google-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lchapo","download_url":"https://codeload.github.com/lchapo/dash-google-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238455088,"owners_count":19475376,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dash","flask","flask-dance","oauth2","plotly"],"created_at":"2024-09-24T13:50:11.008Z","updated_at":"2025-02-12T10:32:17.387Z","avatar_url":"https://github.com/lchapo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deprecation Warning\nThis project is no longer actively maintained and is incompatible with newer versions of Dash (\u003e=1.0). Please consider forking this repo or see the [Dash docs](https://dash.plotly.com/authentication) on officially supported authentication mechanisms.\n\n# Dash Google Auth\n\nDash Google Auth is a simple library using Google OAuth to authenticate and\nview a [Dash](https://dash.plot.ly/) app.\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 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` library using `pip`:\n\n    ```bash\n    $ pip install dash-google-auth\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/lucaschapin/dash-google-auth/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 \u0026 Services \u003e 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flchapo%2Fdash-google-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flchapo%2Fdash-google-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flchapo%2Fdash-google-auth/lists"}