{"id":28394440,"url":"https://github.com/authlib/example-oidc-server","last_synced_at":"2025-07-30T03:13:06.967Z","repository":{"id":36351635,"uuid":"201723812","full_name":"authlib/example-oidc-server","owner":"authlib","description":"Example for OpenID Connect 1.0 Server for Authlib.","archived":false,"fork":false,"pushed_at":"2025-04-30T08:34:53.000Z","size":13,"stargazers_count":63,"open_issues_count":12,"forks_count":35,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-27T00:40:23.767Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://authlib.org/","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/authlib.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,"zenodo":null}},"created_at":"2019-08-11T05:52:15.000Z","updated_at":"2025-05-16T15:56:06.000Z","dependencies_parsed_at":"2025-06-27T00:38:40.642Z","dependency_job_id":"5d531e28-9ebf-4c1a-a71b-59decb38b9be","html_url":"https://github.com/authlib/example-oidc-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/authlib/example-oidc-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authlib%2Fexample-oidc-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authlib%2Fexample-oidc-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authlib%2Fexample-oidc-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authlib%2Fexample-oidc-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/authlib","download_url":"https://codeload.github.com/authlib/example-oidc-server/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/authlib%2Fexample-oidc-server/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265956206,"owners_count":23854992,"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":[],"created_at":"2025-05-31T18:11:40.052Z","updated_at":"2025-07-19T15:32:10.678Z","avatar_url":"https://github.com/authlib.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example of OpenID Connect 1.0 Provider\n\nThis is an example of OpenID Connect 1.0 server in Flask and [Authlib](https://authlib.org/).\n\n- Documentation: \u003chttps://docs.authlib.org/en/latest/flask/2/\u003e\n- Authlib Repo: \u003chttps://github.com/lepture/authlib\u003e\n\n---\n\n## Take a quick look\n\nThis is a ready to run example, let's take a quick experience at first. To\nrun the example, we need to install all the dependencies:\n\n    $ pip install -r requirements.txt\n\nSet Flask and Authlib environment variables:\n\n    # disable check https (DO NOT SET THIS IN PRODUCTION)\n    $ export AUTHLIB_INSECURE_TRANSPORT=1\n\nCreate Database and run the development server:\n\n    $ flask initdb\n    $ flask run\n\nNow, you can open your browser with `http://127.0.0.1:5000/`, login with any\nname you want.\n\nBefore testing, we need to create a client:\n\n![create a client](https://user-images.githubusercontent.com/290496/64176341-35888100-ce98-11e9-8395-fd4cdc029fd2.png)\n\n**NOTE: YOU MUST ADD `openid` SCOPE IN YOUR CLIENT**\n\nLet's take `authorization_code` grant type as an example. Visit:\n\n```\nhttp://127.0.0.1:5000/oauth/authorize?client_id=${CLIENT_ID}\u0026scope=openid+profile\u0026response_type=code\u0026nonce=abc\n```\n\nAfter that, you will be redirect to a URL. For instance:\n\n```\nhttps://example.com/?code=RSv6j745Ri0DhBSvi2RQu5JKpIVvLm8SFd5ObjOZZSijohe0\n```\n\nCopy the code value, use `curl` to get the access token:\n\n```\ncurl -u \"${CLIENT_ID}:${CLIENT_SECRET}\" -XPOST http://127.0.0.1:5000/oauth/token -F grant_type=authorization_code -F code=RSv6j745Ri0DhBSvi2RQu5JKpIVvLm8SFd5ObjOZZSijohe0\n```\n\nNow you can access the userinfo endpoint:\n\n```bash\n$ curl -H \"Authorization: Bearer ${access_token}\" http://127.0.0.1:5000/oauth/userinfo\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauthlib%2Fexample-oidc-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fauthlib%2Fexample-oidc-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fauthlib%2Fexample-oidc-server/lists"}