{"id":18772659,"url":"https://github.com/authgear/authgear-example-python-flask","last_synced_at":"2026-05-09T15:21:20.228Z","repository":{"id":199010122,"uuid":"701828657","full_name":"authgear/authgear-example-python-flask","owner":"authgear","description":"Authentication for Authgear Python Flask Web Application","archived":false,"fork":false,"pushed_at":"2024-03-19T13:09:58.000Z","size":6,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-12-29T08:21:40.590Z","etag":null,"topics":["application","authentication","authgear","authgear-examples","flask","oauth2","oidc","python","web"],"latest_commit_sha":null,"homepage":"https://docs.authgear.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/authgear.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-07T17:17:49.000Z","updated_at":"2023-10-08T11:17:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"8b99cf31-403b-4dbc-9ebf-9ef5c1093b55","html_url":"https://github.com/authgear/authgear-example-python-flask","commit_stats":null,"previous_names":["authgear/authgear-example-python-flask"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authgear%2Fauthgear-example-python-flask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authgear%2Fauthgear-example-python-flask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authgear%2Fauthgear-example-python-flask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authgear%2Fauthgear-example-python-flask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/authgear","download_url":"https://codeload.github.com/authgear/authgear-example-python-flask/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239681025,"owners_count":19679508,"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":["application","authentication","authgear","authgear-examples","flask","oauth2","oidc","python","web"],"created_at":"2024-11-07T19:29:50.269Z","updated_at":"2025-12-13T06:30:13.092Z","avatar_url":"https://github.com/authgear.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Authentication for Authgear Python Flask Web Application\n\nThis sample repository demonstrates how to add authentication to a Python web app built with the [Flask](https://palletsprojects.com/p/flask/) using [Authgear](https://www.authgear.com/).\n\n## What is Authgear?\n\n[Authgear](https://www.authgear.com/) acts as an IAM provider that is a **gatekeeper to the resources** you provide to customers as web and mobile applications, APIs, etc. The gatekeeper initiates authorization as outlined in [OAuth 2.0](https://www.notion.so/concepts/identity-fundamentals#oauth-2.0). The addition of the [OpenID Connect](https://www.notion.so/concepts/identity-fundamentals#open-id-connect) layer adds authentication to secure your users’ digital identities and your product.\n\n## How to run the project\n\n## Prerequisites\n\nBefore you get started, you will need the following:\n\n- A **free Authgear account**. [Sign up](https://accounts.portal.authgear.com/signup) if you don't have one already.\n- Create [Authgear OIDC Client App](https://docs.authgear.com/how-to-guide/authenticate/oidc-provider#setting-up-authgear-in-the-portal) to use it as an OpenID Connect Provider.\n- Make sure that [Python](https://www.python.org/downloads/) 3.10 or above is installed on your machine.\n- Download and Install [Pip](https://pip.pypa.io/en/stable/installation/) to manage project packages.\n\nStart by cloning the project into your local machine:\n\n```bash\ngit clone https://github.com/authgear/authgear-example-python-flask.git\n```\n\nMake the project directory your current working directory:\n\n```bash\ncd authgear-example-python-flask\n```\n\nRename `.env.example` to `.env` and fill it with the client ID, client secret and your Authgear OIDC client app domain. Generate a suitable string for `APP_SECRET_KEY` using openssl rand -hex 32 from your shell and also set it in the environment file.\n\nAlso, add the callback URL to the settings section of your Authgear client app.\n\nRegister `http://localhost:3000/callback` as `Authorized Redirect URIs`.\n\nRun `pip install -r requirements.txt` to install the dependencies and run `python server.py`.\nThe app will be served at [http://localhost:3000/](http://localhost:3000/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauthgear%2Fauthgear-example-python-flask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauthgear%2Fauthgear-example-python-flask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauthgear%2Fauthgear-example-python-flask/lists"}