{
  "id": "task_libraries:oauth/python",
  "path": "/exapedia/python-oauth-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "Python OAuth libraries",
  "answer": [
    {
      "t": "text",
      "text": "Python OAuth libraries implement the OAuth and OpenID Connect flows that let an application act for a user at another service. A client library sends the user to the provider's consent page and exchanges the returned code for tokens. These libraries let apps and AI agents call third-party APIs with a user's permission."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "Python OAuth libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#requests-oauthlib",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F127"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F128"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F6"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F131"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#oauthlib",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F142"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F31"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#msal",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F153"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F157"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F155"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#authlib-library",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F170"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F171"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F174"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#google-auth-oauthlib",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F187"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F191"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#django-allauth",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F204"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#django-oauth-toolkit",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F221"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F222"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#social-auth-core",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F234"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ],
              [
                {
                  "t": "text",
                  "text": "Not on GitHub"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "pypi"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#requests-oauthlib",
          "label": [
            {
              "t": "text",
              "text": "Requests-OAuthlib"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F128"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Legacy OAuth client",
            "Authorization server",
            "Async HTTP client"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#requests-oauthlib",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F127"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F134"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F136"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#oauthlib",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F142"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F149"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F150"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#msal",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F153"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F164"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#authlib-library",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F170"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#google-auth-oauthlib",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F187"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F196"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#django-allauth",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F204"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F213"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#django-oauth-toolkit",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F221"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F230"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F232"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#social-auth-core",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F234"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F243"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "requests-oauthlib",
          "name": [
            {
              "t": "fact",
              "fact": "F127"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/requests/requests-oauthlib"
            },
            {
              "label": "pypi",
              "href": "https://pypi.org/project/requests-oauthlib"
            },
            {
              "label": "Docs",
              "href": "https://requests-oauthlib.readthedocs.io/en/latest/api.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F10"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F128"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F6"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F130"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://requests-oauthlib.readthedocs.io/en/latest/api.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F127"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F11"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F12"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F140"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F141"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/singingwolfboy/flask-dance",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F140"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def login(self):\n    log.debug(\"client_id = %s\", self.client_id)\n    self.session.redirect_uri = url_for(\".authorized\", _external=True)\n    if self.use_pkce:\n        code_verifier = generate_token(length=48)\n        code_challenge = self.session._client.create_code_challenge(\n            code_verifier=code_verifier,\n            code_challenge_method=self.code_challenge_method,\n        )\n        self.authorization_url_params.update(\n            {\n                \"code_challenge_method\": self.code_challenge_method,\n                \"code_challenge\": code_challenge,\n            }\n        )\n        code_verifier_key = f\"{self.name}_oauth_code_verifier\"\n        flask.session[code_verifier_key] = code_verifier\n        log.debug(\"code_verifier = %s\", code_verifier)\n\n    url, state = self.session.authorization_url(\n        self.authorization_url, state=self.state, **self.authorization_url_params\n    )\n    state_key = f\"{self.name}_oauth_state\"\n    flask.session[state_key] = state\n    log.debug(\"state = %s\", state)\n    log.debug(\"redirect URL = %s\", url)\n    oauth_before_login.send(self, url=url)\n    return redirect(url)",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/singingwolfboy/flask-dance/blob/70f79fd9b633cea7b9742219888fac08069edc22/flask_dance/consumer/oauth2.py#L213-L240",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F139"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20requests-oauthlib%20for%20login%20redirects%2C%20authorization%20request%20validation%20and%20saved%20token%20refresh&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F127"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from requests_oauthlib import OAuth2Session\n\nclient = OAuth2Session(client_id, redirect_uri=redirect_uri, scope=scopes)\nauthorization_url, state = client.authorization_url(authorization_endpoint)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://requests-oauthlib.readthedocs.io/en/latest/api.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F132"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "oauthlib",
          "name": [
            {
              "t": "fact",
              "fact": "F142"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/oauthlib/oauthlib"
            },
            {
              "label": "pypi",
              "href": "https://pypi.org/project/oauthlib"
            },
            {
              "label": "Docs",
              "href": "https://oauthlib.readthedocs.io/en/latest/oauth2/clients/webapplicationclient.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F36"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F31"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F145"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://oauthlib.readthedocs.io/en/latest/oauth2/clients/webapplicationclient.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F142"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F37"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F38"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F44"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from oauthlib.oauth2 import WebApplicationClient\n\nclient = WebApplicationClient(client_id)\nauthorization_url = client.prepare_request_uri(authorization_endpoint, redirect_uri=redirect_uri, scope=scopes, state=state)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://oauthlib.readthedocs.io/en/latest/oauth2/clients/webapplicationclient.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "web_application.py"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Python%20projects%20using%20oauthlib%20for%20login%20redirects%2C%20authorization%20request%20validation%20and%20saved%20token%20refresh&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F142"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F147"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "msal",
          "name": [
            {
              "t": "fact",
              "fact": "F153"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/AzureAD/microsoft-authentication-library-for-python"
            },
            {
              "label": "pypi",
              "href": "https://pypi.org/project/msal"
            },
            {
              "label": "Docs",
              "href": "https://msal-python.readthedocs.io/en/latest/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F160"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F156"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F155"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://msal-python.readthedocs.io/en/latest/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F153"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F168"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F169"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/Azure/azure-workload-identity",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F168"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def get_token(self, *scopes, **kwargs):\n    # get the token using the application\n    token = self.app.acquire_token_for_client(list(scopes))\n    if 'error' in token:\n        raise Exception(token['error_description'])\n    expires_on = time.time() + token['expires_in']\n    # return an access token with the token string and expiration time\n    return AccessToken(token['access_token'], int(expires_on))",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/Azure/azure-workload-identity/blob/6bc89187a92df647064f9d4ffe1bd5413bce6927/examples/msal-python/token_credential.py#L26-L33",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F167"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=msal%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F153"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from msal import ConfidentialClientApplication\n\napp = ConfidentialClientApplication(client_id, authority=authority, client_credential=client_secret)\nresult = app.acquire_token_for_client(scopes=scopes)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://msal-python.readthedocs.io/en/latest/",
                  "label": [
                    {
                      "t": "text",
                      "text": "index.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F158"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "authlib-library",
          "name": [
            {
              "t": "fact",
              "fact": "F170"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/authlib/authlib"
            },
            {
              "label": "pypi",
              "href": "https://pypi.org/project/authlib"
            },
            {
              "label": "Docs",
              "href": "https://docs.authlib.org/en/stable/oauth2/client/http/requests.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F177"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F171"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.authlib.org/en/stable/oauth2/client/http/requests.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F170"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F185"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/authlib/example-oauth2-server",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F185"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "@bp.route(\"/oauth/authorize\", methods=[\"GET\", \"POST\"])\ndef authorize():\n    user = current_user()\n    if not user:\n        return redirect(\n            url_for(\"home.home\", next=request.script_root + request.full_path)\n        )\n\n    try:\n        grant = authorization.get_consent_grant(end_user=user)\n    except OAuth2Error as error:\n        return authorization.handle_error_response(request, error)\n\n    if request.method == \"GET\":\n        return render_template(\"authorize.html\", user=user, grant=grant)\n\n    grant_user = user if \"confirm\" in request.form else None\n    return authorization.create_authorization_response(\n        grant=grant, grant_user=grant_user\n    )\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/authlib/example-oauth2-server/blob/48f26d549359d189b1c1e75ade96f14d860a8bd1/src/website/routes.py#L107-L126",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F184"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=authlib%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F170"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from authlib.integrations.requests_client import OAuth2Session\n\nclient = OAuth2Session(client_id, client_secret, redirect_uri=redirect_uri)\nauthorization_url, state = client.create_authorization_url(authorization_endpoint)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://docs.authlib.org/en/stable/oauth2/client/http/requests.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "requests.rst"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F175"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "google-auth-oauthlib",
          "name": [
            {
              "t": "fact",
              "fact": "F187"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/googleapis/google-cloud-python"
            },
            {
              "label": "pypi",
              "href": "https://pypi.org/project/google-auth-oauthlib"
            },
            {
              "label": "Docs",
              "href": "https://google-auth-oauthlib.readthedocs.io/en/latest/reference/google_auth_oauthlib.flow.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F194"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F190"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://google-auth-oauthlib.readthedocs.io/en/latest/reference/google_auth_oauthlib.flow.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F187"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/burnash/gspread",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F202"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def local_server_flow(\n    client_config: Mapping[str, Any], scopes: Iterable[str], port: int = 0\n) -> OAuthCredentials:\n    \"\"\"Run an OAuth flow using a local server strategy.\n\n    Creates an OAuth flow and runs `google_auth_oauthlib.flow.InstalledAppFlow.run_local_server <https://google-auth-oauthlib.readthedocs.io/en/latest/reference/google_auth_oauthlib.flow.html#google_auth_oauthlib.flow.InstalledAppFlow.run_local_server>`_.\n    This will start a local web server and open the authorization URL in\n    the user's browser.\n\n    Pass this function to ``flow`` parameter of :meth:`~gspread.oauth` to run\n    a local server flow.\n    \"\"\"\n    flow = InstalledAppFlow.from_client_config(client_config, scopes)\n    return flow.run_local_server(port=port)",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/burnash/gspread/blob/7ca71eaa4658320b89f82f49620dac6891986cdd/gspread/auth.py#L98-L111",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F201"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=google-auth-oauthlib%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F187"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from google_auth_oauthlib.flow import InstalledAppFlow\n\nflow = InstalledAppFlow.from_client_secrets_file(\"client_secrets.json\", scopes=scopes)\ncredentials = flow.run_local_server(port=0)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://google-auth-oauthlib.readthedocs.io/en/latest/reference/google_auth_oauthlib.flow.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "flow.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F192"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "django-allauth",
          "name": [
            {
              "t": "fact",
              "fact": "F204"
            }
          ],
          "links": [
            {
              "label": "pypi",
              "href": "https://pypi.org/project/django-allauth"
            },
            {
              "label": "Docs",
              "href": "https://docs.allauth.org/en/latest/installation/quickstart.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F211"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F207"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F206"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.allauth.org/en/latest/installation/quickstart.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F204"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F219"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/iMerica/dj-rest-auth",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F219"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def get_social_login(self, adapter, app, token, response):\n    \"\"\"\n    :param adapter: allauth.socialaccount Adapter subclass.\n        Usually OAuthAdapter or Auth2Adapter\n    :param app: `allauth.socialaccount.SocialApp` instance\n    :param token: `allauth.socialaccount.SocialToken` instance\n    :param response: Provider's response for OAuth1. Not used in the\n    :returns: A populated instance of the\n        `allauth.socialaccount.SocialLoginView` instance\n    \"\"\"\n    request = self._get_request()\n    social_login = adapter.complete_login(request, app, token, response=response)\n    social_login.token = token\n    return social_login",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/iMerica/dj-rest-auth/blob/69ef459bdcd4a4a25121ad2064cc18a6601addb6/dj_rest_auth/registration/serializers.py#L63-L76",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F218"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=django-allauth%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F204"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from django.urls import include, path\n\nurlpatterns = [path(\"accounts/\", include(\"allauth.urls\"))]\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://docs.allauth.org/en/latest/installation/quickstart.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "quickstart.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F209"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "django-oauth-toolkit",
          "name": [
            {
              "t": "fact",
              "fact": "F221"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/django-oauth/django-oauth-toolkit"
            },
            {
              "label": "pypi",
              "href": "https://pypi.org/project/django-oauth-toolkit"
            },
            {
              "label": "Docs",
              "href": "https://django-oauth-toolkit.readthedocs.io/en/latest/getting_started.html"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F228"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F222"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://django-oauth-toolkit.readthedocs.io/en/latest/getting_started.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F221"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from django.urls import include, path\n\nurlpatterns = [path(\"o/\", include(\"oauth2_provider.urls\", namespace=\"oauth2_provider\"))]\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://django-oauth-toolkit.readthedocs.io/en/latest/getting_started.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "getting_started.rst"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=django-oauth-toolkit%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F221"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F226"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "social-auth-core",
          "name": [
            {
              "t": "fact",
              "fact": "F234"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/python-social-auth/social-core"
            },
            {
              "label": "pypi",
              "href": "https://pypi.org/project/social-auth-core"
            },
            {
              "label": "Docs",
              "href": "https://api.github.com/repos/python-social-auth/social-core/contents/social_core/backends/base.py?ref=7.2.0"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F241"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://api.github.com/repos/python-social-auth/social-core/contents/social_core/backends/base.py?ref=7.2.0",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F234"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F249"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F250"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/python-social-auth/social-app-django",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F249"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def _complete(request, backend, *args, **kwargs):\n    _discard_session_partial_of_other_user(request)\n    kwargs.update(\n        user=request.user,\n        redirect_name=REDIRECT_FIELD_NAME,\n        request=request,\n    )\n    return do_complete(request.backend, _do_login, *args, **kwargs)",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/python-social-auth/social-app-django/blob/f88587c894c0114d7f31ad150fd0a4dbc654fa5f/social_django/views.py#L274-L281",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F248"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=social-auth-core%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F234"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from social_core.backends.github import GithubOAuth2\n\nbackend = GithubOAuth2(strategy=strategy, redirect_uri=redirect_uri)\nauthorization_url = backend.auth_url()\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://api.github.com/repos/python-social-auth/social-core/contents/social_core/backends/base.py?ref=7.2.0",
                  "label": [
                    {
                      "t": "text",
                      "text": "base.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F239"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which Python OAuth library should I use?",
      "a": [
        {
          "t": "link",
          "href": "#authlib-library",
          "label": [
            {
              "t": "text",
              "text": "Authlib"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits applications that need OAuth clients and Flask or Django authorization servers. "
        },
        {
          "t": "link",
          "href": "#requests-oauthlib",
          "label": [
            {
              "t": "text",
              "text": "Requests-OAuthlib"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits client code built on Requests. "
        },
        {
          "t": "link",
          "href": "#msal",
          "label": [
            {
              "t": "text",
              "text": "MSAL"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits applications that sign users in with Microsoft identity."
        }
      ]
    },
    {
      "q": "What is django-allauth?",
      "a": [
        {
          "t": "link",
          "href": "#django-allauth",
          "label": [
            {
              "t": "text",
              "text": "django-allauth"
            }
          ]
        },
        {
          "t": "text",
          "text": " is a set of Django apps for sign-up, account management, and social login with many providers. An optional module turns it into an OpenID Connect identity provider."
        }
      ]
    },
    {
      "q": "What is MSAL for Python?",
      "a": [
        {
          "t": "link",
          "href": "#msal",
          "label": [
            {
              "t": "text",
              "text": "MSAL"
            }
          ]
        },
        {
          "t": "text",
          "text": " acquires and caches tokens for users and apps on the Microsoft identity platform. It handles Microsoft-specific flows rather than arbitrary OAuth providers."
        }
      ]
    },
    {
      "q": "What is Authlib?",
      "a": [
        {
          "t": "link",
          "href": "#authlib-library",
          "label": [
            {
              "t": "text",
              "text": "Authlib"
            }
          ]
        },
        {
          "t": "text",
          "text": " builds OAuth and OpenID Connect clients and servers. It offers synchronous clients on Requests and asynchronous clients on HTTPX."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, requests-oauthlib",
      "display": "Requests-OAuthlib",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, requests-oauthlib",
      "display": "268.6M",
      "asOf": "2026-11-16"
    },
    "F3": {
      "label": "License, requests-oauthlib",
      "display": "ISC",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, requests-oauthlib",
      "display": "2.0.0, Mar 2024",
      "asOf": "2024-03-22"
    },
    "F5": {
      "label": "Package release date, requests-oauthlib",
      "display": "Mar 2024",
      "asOf": "2024-03-22"
    },
    "F6": {
      "label": "Repository stars, requests-oauthlib",
      "display": "1.8K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Authorization-code PKCE, requests-oauthlib",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Refreshes access tokens, requests-oauthlib",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Install, requests-oauthlib",
      "display": "pip install requests-oauthlib",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "What it does, requests-oauthlib",
      "display": "Adds OAuth request signing and token workflows to the Requests session interface.",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "strengths lead, requests-oauthlib",
      "display": "Extends the Requests session interface",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "strengths, requests-oauthlib",
      "display": "Generate authorization URLs, exchange codes, and call protected resources with OAuth2Session.",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths lead, requests-oauthlib",
      "display": "Refreshes and saves tokens automatically",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths, requests-oauthlib",
      "display": "Configure token_updater and the refresh endpoint to persist renewed credentials.",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "limitations lead, requests-oauthlib",
      "display": "Refresh timing needs accurate expiry",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "limitations, requests-oauthlib",
      "display": "Supply accurate expires_in values so the session can detect expired tokens.",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations lead, requests-oauthlib",
      "display": "Refreshed tokens need a saver",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations, requests-oauthlib",
      "display": "Provide token_updater or catch TokenUpdated and persist the returned credentials.",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "Quickstart, requests-oauthlib",
      "display": "\nclient_id = 'OAUTH_CLIENT_ID'\n\nauthorization_base_url = \"https://OAUTH_IDP_DOMAIN/authorize\"\ntoken_url = \"https://OAUTH_IDP_DOMAIN/oauth/token\"\nscope = [\"openid\"]\n\nfrom requests_oauthlib import OAuth2Session\nredirect_uri = 'http://localhost:8080/callback'\n\nsession = OAuth2Session(client_id, scope=scope, redirect_uri=redirect_uri, pkce=\"S256\")\nauthorization_url, state = session.authorization_url(authorization_base_url,access_type=\"offline\")\n\nprint(\"Please go here and authorize:\")\nprint(authorization_url)\n\nredirect_response = input('Paste the full redirect URL here: ')\n\ntoken = session.fetch_token(token_url, authorization_response=redirect_response, include_client_id=True)\nprint(token)\n",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "Quickstart source reference, requests-oauthlib",
      "display": "native_spa_pkce_auth0.py",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Project function, requests-oauthlib",
      "display": "def login(self):\n    log.debug(\"client_id = %s\", self.client_id)\n    self.session.redirect_uri = url_for(\".authorized\", _external=True)\n    if self.use_pkce:\n        code_verifier = generate_token(length=48)\n        code_challenge = self.session._client.create_code_challenge(\n            code_verifier=code_verifier,\n            code_challenge_method=self.code_challenge_method,\n        )\n        self.authorization_url_params.update(\n            {\n                \"code_challenge_method\": self.code_challenge_method,\n                \"code_challenge\": code_challenge,\n            }\n        )\n        code_verifier_key = f\"{self.name}_oauth_code_verifier\"\n        flask.session[code_verifier_key] = code_verifier\n        log.debug(\"code_verifier = %s\", code_verifier)\n\n    url, state = self.session.authorization_url(\n        self.authorization_url, state=self.state, **self.authorization_url_params\n    )\n    state_key = f\"{self.name}_oauth_state\"\n    flask.session[state_key] = state\n    log.debug(\"state = %s\", state)\n    log.debug(\"redirect URL = %s\", url)\n    oauth_before_login.send(self, url=url)\n    return redirect(url)\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function reference, requests-oauthlib",
      "display": "oauth2.py · login()",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project repository, requests-oauthlib",
      "display": "singingwolfboy/flask-dance",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project stars, singingwolfboy/flask-dance",
      "display": "1.0K",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project push date, singingwolfboy/flask-dance",
      "display": "Jun 2024",
      "asOf": "2024-06-07"
    },
    "F26": {
      "label": "Library name, oauthlib",
      "display": "OAuthLib",
      "asOf": "2026-11-17"
    },
    "F27": {
      "label": "Monthly downloads, oauthlib",
      "display": "262.5M",
      "asOf": "2026-11-16"
    },
    "F28": {
      "label": "License, oauthlib",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-17"
    },
    "F29": {
      "label": "Package release, oauthlib",
      "display": "4.0.1, Oct 2026",
      "asOf": "2026-10-31"
    },
    "F30": {
      "label": "Package release date, oauthlib",
      "display": "Oct 2026",
      "asOf": "2026-10-31"
    },
    "F31": {
      "label": "Repository stars, oauthlib",
      "display": "3.0K",
      "asOf": "2026-11-17"
    },
    "F32": {
      "label": "OAuth server support, oauthlib",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Authorization-code PKCE, oauthlib",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Refreshes access tokens, oauthlib",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Install, oauthlib",
      "display": "pip install oauthlib",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "What it does, oauthlib",
      "display": "Implements OAuth protocol logic independently of a particular HTTP library or web framework.",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "strengths lead, oauthlib",
      "display": "Fits different transports and frameworks",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "strengths, oauthlib",
      "display": "Connect OAuth protocol logic to the application’s chosen transport and server.",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths lead, oauthlib",
      "display": "Supports authorization-server implementations",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths, oauthlib",
      "display": "Use provider endpoints with application-specific validators and persistence.",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "limitations lead, oauthlib",
      "display": "Servers need custom validation storage",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "limitations, oauthlib",
      "display": "Implement RequestValidator methods against the application’s storage backend.",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations lead, oauthlib",
      "display": "Token-body helpers cannot enforce HTTPS",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations, oauthlib",
      "display": "Enforce HTTPS in the transport that sends generated token request bodies.",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "Quickstart, oauthlib",
      "display": "from oauthlib.oauth2 import WebApplicationClient\nclient = WebApplicationClient('your_id')\nclient.prepare_request_uri('https://example.com')\nclient.prepare_request_uri('https://example.com', redirect_uri='https://a.b/callback')\nclient.prepare_request_uri('https://example.com', scope=['profile', 'pictures'])\nclient.prepare_request_uri('https://example.com', code_challenge='kjasBS523KdkAILD2k78NdcJSk2k3KHG6')\nclient.prepare_request_uri('https://example.com', code_challenge_method='S256')\nclient.prepare_request_uri('https://example.com', foo='bar')\n",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "Project function, oauthlib",
      "display": "def authenticate_client_request(self, request: HttpRequest) -> tuple[bool, OauthlibRequest]:\n    # ...\n    uri, http_method, body, headers = self._extract_params(request)\n    oauth_request = OauthlibRequest(uri, http_method, body, headers)\n    valid = self.server.request_validator.authenticate_client(oauth_request)\n    client = getattr(oauth_request, \"client\", None) if valid else None\n    setattr(request, _AUTHENTICATED_CLIENT_ATTRIBUTE, client)\n    return valid, oauth_request\n",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Project function reference, oauthlib",
      "display": "backends_oauthlib.py · authenticate_client_request()",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project repository, oauthlib",
      "display": "django-oauth/django-oauth-toolkit",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project stars, django-oauth/django-oauth-toolkit",
      "display": "3.3K",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project push date, django-oauth/django-oauth-toolkit",
      "display": "Oct 2026",
      "asOf": "2026-10-31"
    },
    "F51": {
      "label": "Library name, Authlib",
      "display": "Authlib",
      "asOf": "2026-11-17"
    },
    "F52": {
      "label": "Monthly downloads, Authlib",
      "display": "130.2M",
      "asOf": "2026-11-16"
    },
    "F53": {
      "label": "License, Authlib",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Package release, Authlib",
      "display": "1.9.6, Nov 2026",
      "asOf": "2026-11-14"
    },
    "F55": {
      "label": "Package release date, Authlib",
      "display": "Nov 2026",
      "asOf": "2026-11-14"
    },
    "F56": {
      "label": "Repository stars, Authlib",
      "display": "5.5K",
      "asOf": "2026-11-17"
    },
    "F57": {
      "label": "Async HTTP client, Authlib",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "OAuth server support, Authlib",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Authorization-code PKCE, Authlib",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Refreshes access tokens, Authlib",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "Install, Authlib",
      "display": "pip install Authlib Flask",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "What it does, Authlib",
      "display": "Implements OAuth and OpenID Connect clients and servers with web-framework integrations.",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "strengths lead, Authlib",
      "display": "Builds clients and authorization servers",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "strengths, Authlib",
      "display": "Use framework integrations for consuming identity services or issuing tokens.",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths lead, Authlib",
      "display": "Offers asynchronous HTTP clients",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "strengths, Authlib",
      "display": "Await token requests and authenticated API calls with AsyncOAuth2Client.",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "limitations lead, Authlib",
      "display": "Login state needs application storage",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "limitations, Authlib",
      "display": "Save returned state across browser redirects and restore it during the callback.",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "limitations lead, Authlib",
      "display": "Refreshed tokens need persistence hooks",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "limitations, Authlib",
      "display": "Provide update_token to save refreshed credentials in application storage.",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "Quickstart, Authlib",
      "display": "from flask import Flask, url_for, session\nfrom flask import render_template, redirect\nfrom authlib.integrations.flask_client import OAuth\n\n\napp = Flask(__name__)\napp.secret_key = '!secret'\napp.config.from_object('config')\n\nCONF_URL = 'https://accounts.google.com/.well-known/openid-configuration'\noauth = OAuth(app)\noauth.register(\n    name='google',\n    server_metadata_url=CONF_URL,\n    client_kwargs={\n        'scope': 'openid email profile'\n    }\n)\n\n\n@app.route('/')\ndef homepage():\n    user = session.get('user')\n    return render_template('home.html', user=user)\n\n\n@app.route('/login')\ndef login():\n    redirect_uri = url_for('auth', _external=True)\n    return oauth.google.authorize_redirect(redirect_uri)\n\n\n@app.route('/auth')\ndef auth():\n    token = oauth.google.authorize_access_token()\n    session['user'] = token['userinfo']\n    return redirect('/')\n\n\n@app.route('/logout')\ndef logout():\n    session.pop('user', None)\n    return redirect('/')\n",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Library name, httpx-oauth",
      "display": "HTTPX OAuth",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Monthly downloads, httpx-oauth",
      "display": "838.6K",
      "asOf": "2026-11-16"
    },
    "F74": {
      "label": "License, httpx-oauth",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Package release, httpx-oauth",
      "display": "0.17.0, May 2026",
      "asOf": "2026-05-13"
    },
    "F76": {
      "label": "Package release date, httpx-oauth",
      "display": "May 2026",
      "asOf": "2026-05-13"
    },
    "F77": {
      "label": "Repository stars, httpx-oauth",
      "display": "184",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Async HTTP client, httpx-oauth",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F79": {
      "label": "Authorization-code PKCE, httpx-oauth",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Refreshes access tokens, httpx-oauth",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F81": {
      "label": "Install, httpx-oauth",
      "display": "pip install httpx-oauth fastapi",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "What it does, httpx-oauth",
      "display": "Provides asynchronous OAuth client workflows and preconfigured identity-provider clients using HTTPX.",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "strengths lead, httpx-oauth",
      "display": "Awaits OAuth client operations",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "strengths, httpx-oauth",
      "display": "Generate authorization URLs and exchange or refresh tokens asynchronously.",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "strengths lead, httpx-oauth",
      "display": "Includes preconfigured identity clients",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "strengths, httpx-oauth",
      "display": "Use bundled provider clients with their endpoint and profile implementations.",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "limitations lead, httpx-oauth",
      "display": "Refreshing depends on provider support",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "limitations, httpx-oauth",
      "display": "Configure a refresh endpoint only when the identity service supports refresh tokens.",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "limitations lead, httpx-oauth",
      "display": "Generic clients need profile implementations",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "limitations, httpx-oauth",
      "display": "Implement get_profile and get_id_email when adding provider-specific identity retrieval.",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "Quickstart, httpx-oauth",
      "display": "from fastapi import FastAPI, Depends\nfrom httpx_oauth.integrations.fastapi import OAuth2AuthorizeCallback\nfrom httpx_oauth.oauth2 import OAuth2\n\nclient = OAuth2(\"CLIENT_ID\", \"CLIENT_SECRET\", \"AUTHORIZE_ENDPOINT\", \"ACCESS_TOKEN_ENDPOINT\")\noauth2_authorize_callback = OAuth2AuthorizeCallback(client, \"oauth-callback\")\napp = FastAPI()\n\n@app.get(\"/oauth-callback\", name=\"oauth-callback\")\nasync def oauth_callback(access_token_state=Depends(oauth2_authorize_callback)):\n    token, state = access_token_state\n    # Do something useful\n",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "Project function, httpx-oauth",
      "display": "def refresh_account_oauth_token(self, account: MailAccount) -> bool:\n    # ...\n    logger = logging.getLogger(\"paperless_mail\")\n    logger.debug(f\"Attempting to refresh oauth token for account {account}\")\n    if account.refresh_token is None:\n        logger.error(f\"Account {account} has no refresh token to use\")\n        return False\n    try:\n        result: OAuth2Token\n        if account.account_type == MailAccount.MailAccountType.GMAIL_OAUTH:\n            result = asyncio.run(\n                self.gmail_client.refresh_token(\n                    refresh_token=account.refresh_token,\n                ),\n            )\n        elif account.account_type == MailAccount.MailAccountType.OUTLOOK_OAUTH:\n            result = asyncio.run(\n                self.outlook_client.refresh_token(\n                    refresh_token=account.refresh_token,\n                ),\n            )\n        else:\n            logger.error(f\"Account {account} does not use OAuth\")\n            return False\n        if \"refresh_token\" in result:\n            # Outlook returns a new refresh token on refresh, Gmail does not\n            account.refresh_token = result[\"refresh_token\"]\n        account.password = result[\"access_token\"]\n        account.expiration = timezone.now() + timedelta(\n            seconds=result[\"expires_in\"],\n        )\n        account.save()\n        logger.debug(f\"Successfully refreshed oauth token for account {account}\")\n        return True\n    except RefreshTokenError as e:\n        logger.error(f\"Failed to refresh oauth token for account {account}: {e}\")\n        return False\n",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "Project function reference, httpx-oauth",
      "display": "oauth.py · refresh_account_oauth_token()",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "Project repository, httpx-oauth",
      "display": "paperless-ngx/paperless-ngx",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "Project stars, paperless-ngx/paperless-ngx",
      "display": "48.2K",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "Project push date, paperless-ngx/paperless-ngx",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F97": {
      "label": "Developer need",
      "display": "Client and server integrations",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Why choose Authlib",
      "display": "framework-integrated clients and providers",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Developer need in introduction",
      "display": "client and server integrations",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "When to consider requests-oauthlib",
      "display": "an existing Requests session needs client OAuth support",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Developer need",
      "display": "Existing Requests applications",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Why choose requests-oauthlib",
      "display": "OAuth workflows on the familiar session interface",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Developer need in introduction",
      "display": "existing Requests applications",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "When to consider httpx-oauth",
      "display": "the application should await OAuth operations",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Developer need",
      "display": "Custom OAuth protocol integration",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Why choose oauthlib",
      "display": "transport-independent OAuth logic",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Developer need in introduction",
      "display": "custom OAuth protocol integration",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "When to consider Authlib",
      "display": "ready-made framework client/server integrations are needed",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Developer need",
      "display": "Asynchronous identity clients",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "Why choose httpx-oauth",
      "display": "awaitable client operations",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "Developer need in introduction",
      "display": "asynchronous identity clients",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "When to consider Authlib",
      "display": "the project must also issue OAuth tokens",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "Page introduction",
      "display": "Python OAuth libraries let application developers implement OAuth authorization and token flows.",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "FAQ: Which Python OAuth library should I choose?",
      "display": "Authlib supplies both client and provider integrations.",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "FAQ: Which Python OAuth library should I choose?",
      "display": "Requests-OAuthlib extends the Requests session workflow.",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "FAQ: Which Python OAuth library should I choose?",
      "display": "OAuthLib separates protocol logic from HTTP and web frameworks.",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "FAQ: Which Python OAuth library should I choose?",
      "display": "HTTPX OAuth supplies asynchronous client operations.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "FAQ: Is an OAuth client library also an authorization server?",
      "display": "Authlib supports both roles.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: Is an OAuth client library also an authorization server?",
      "display": "OAuthLib can supply provider protocol logic, while the application supplies validators and persistence.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: Why does automatic token refresh need an expiry value?",
      "display": "Requests-OAuthlib needs an accurate expires_in value to detect expiry and trigger refreshing.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: Who saves refreshed OAuth credentials?",
      "display": "Requests-OAuthlib can call the application’s token_updater callback to persist refreshed tokens.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: Who saves refreshed OAuth credentials?",
      "display": "Authlib also accepts an application token-update hook.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: What login state must survive the browser redirect?",
      "display": "Save the state returned with the authorization URL for use during the callback.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: Does OAuthLib enforce HTTPS for every generated token request?",
      "display": "Token-body helpers do not receive the request URI; enforce secure transport when sending those requests.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "FAQ: Can every identity service refresh or revoke tokens?",
      "display": "HTTPX OAuth makes refresh and revocation endpoints optional because provider support varies.",
      "asOf": "2026-11-17"
    },
    "F126": {
      "label": "FAQ: Does a generic HTTPX OAuth client know every profile format?",
      "display": "Profile and user-identity methods require provider-specific implementations.",
      "asOf": "2026-11-17"
    },
    "F127": {
      "label": "Library name, requests-oauthlib",
      "display": "Requests-OAuthlib",
      "asOf": "2026-11-20"
    },
    "F128": {
      "label": "Monthly downloads, requests-oauthlib",
      "display": "278.1M",
      "asOf": "2026-11-20"
    },
    "F129": {
      "label": "License, requests-oauthlib",
      "display": "ISC",
      "asOf": "2026-11-20"
    },
    "F130": {
      "label": "Package release, requests-oauthlib",
      "display": "2.0.0",
      "asOf": "2026-11-20"
    },
    "F131": {
      "label": "Package release date, requests-oauthlib",
      "display": "Mar 2024",
      "asOf": "2026-11-20"
    },
    "F132": {
      "label": "Install, requests-oauthlib",
      "display": "python -m pip install requests-oauthlib==2.0.0",
      "asOf": "2026-11-20"
    },
    "F133": {
      "label": "Quickstart, requests-oauthlib",
      "display": "from requests_oauthlib import OAuth2Session\n\nclient = OAuth2Session(client_id, redirect_uri=redirect_uri, scope=scopes)\nauthorization_url, state = client.authorization_url(authorization_endpoint)\n",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "Legacy OAuth client, requests-oauthlib",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "Authorization server, requests-oauthlib",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Async HTTP client, requests-oauthlib",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "Native role, requests-oauthlib",
      "display": "Provider-independent OAuth1/OAuth2 sessions layered on Requests; client-side HTTP workflow, not an authorization server.",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Project function, requests-oauthlib",
      "display": "def login(self):\n    log.debug(\"client_id = %s\", self.client_id)\n    self.session.redirect_uri = url_for(\".authorized\", _external=True)\n    if self.use_pkce:\n        code_verifier = generate_token(length=48)\n        code_challenge = self.session._client.create_code_challenge(\n            code_verifier=code_verifier,\n            code_challenge_method=self.code_challenge_method,\n        )\n        self.authorization_url_params.update(\n            {\n                \"code_challenge_method\": self.code_challenge_method,\n                \"code_challenge\": code_challenge,\n            }\n        )\n        code_verifier_key = f\"{self.name}_oauth_code_verifier\"\n        flask.session[code_verifier_key] = code_verifier\n        log.debug(\"code_verifier = %s\", code_verifier)\n\n    url, state = self.session.authorization_url(\n        self.authorization_url, state=self.state, **self.authorization_url_params\n    )\n    state_key = f\"{self.name}_oauth_state\"\n    flask.session[state_key] = state\n    log.debug(\"state = %s\", state)\n    log.debug(\"redirect URL = %s\", url)\n    oauth_before_login.send(self, url=url)\n    return redirect(url)",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Project source file, requests-oauthlib",
      "display": "flask_dance/consumer/oauth2.py",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Project full_name, requests-oauthlib",
      "display": "singingwolfboy/flask-dance",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Project stargazers_count, requests-oauthlib",
      "display": "1.0K",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Library name, oauthlib",
      "display": "OAuthlib",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "Monthly downloads, oauthlib",
      "display": "273.5M",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "License, oauthlib",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Package release, oauthlib",
      "display": "4.0.1",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Package release date, oauthlib",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "Install, oauthlib",
      "display": "python -m pip install oauthlib==4.0.1",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Quickstart, oauthlib",
      "display": "from oauthlib.oauth2 import WebApplicationClient\n\nclient = WebApplicationClient(client_id)\nauthorization_url = client.prepare_request_uri(authorization_endpoint, redirect_uri=redirect_uri, scope=scopes, state=state)\n",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Legacy OAuth client, oauthlib",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Authorization server, oauthlib",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Async HTTP client, oauthlib",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Native role, oauthlib",
      "display": "OAuth1/OAuth2 protocol primitives and validator interfaces for clients and providers; transport/storage/framework integration are host concerns.",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Library name, msal",
      "display": "MSAL",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Monthly downloads, msal",
      "display": "176.6M",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "License, msal",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Package release, msal",
      "display": "1.39.0",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Package release date, msal",
      "display": "Sep 2026",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Install, msal",
      "display": "python -m pip install msal==1.39.0",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Quickstart, msal",
      "display": "from msal import ConfidentialClientApplication\n\napp = ConfidentialClientApplication(client_id, authority=authority, client_credential=client_secret)\nresult = app.acquire_token_for_client(scopes=scopes)\n",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Official description, msal",
      "display": "Authenticates users with Microsoft Azure so an app can access the Microsoft Cloud.",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Quickstart source file, msal",
      "display": "index.html",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Legacy OAuth client, msal",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "Authorization server, msal",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Async HTTP client, msal",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Native role, msal",
      "display": "Microsoft identity-platform user/app token acquisition, caching, and Microsoft-specific flow policies; not a generic arbitrary-provider OAuth SDK.",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Project function, msal",
      "display": "def get_token(self, *scopes, **kwargs):\n    # get the token using the application\n    token = self.app.acquire_token_for_client(list(scopes))\n    if 'error' in token:\n        raise Exception(token['error_description'])\n    expires_on = time.time() + token['expires_in']\n    # return an access token with the token string and expiration time\n    return AccessToken(token['access_token'], int(expires_on))",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Project source file, msal",
      "display": "examples/msal-python/token_credential.py",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Project full_name, msal",
      "display": "Azure/azure-workload-identity",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Project stargazers_count, msal",
      "display": "345",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Library name, authlib",
      "display": "Authlib",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Monthly downloads, authlib",
      "display": "139.8M",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "License, authlib",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "Package release, authlib",
      "display": "1.9.9",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Package release date, authlib",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Install, authlib",
      "display": "python -m pip install authlib==1.9.9 requests",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Quickstart, authlib",
      "display": "from authlib.integrations.requests_client import OAuth2Session\n\nclient = OAuth2Session(client_id, client_secret, redirect_uri=redirect_uri)\nauthorization_url, state = client.create_authorization_url(authorization_endpoint)\n",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "Official description, authlib",
      "display": "Builds OAuth and OpenID Connect servers and clients.",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Quickstart source file, authlib",
      "display": "docs/oauth2/client/http/requests.rst",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "Legacy OAuth client, authlib",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Authorization server, authlib",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "Async HTTP client, authlib",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Native role, authlib",
      "display": "Provider-independent OAuth clients plus Flask/Django authorization/resource servers, with synchronous Requests and asynchronous HTTPX2 clients.",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Project function, authlib",
      "display": "@bp.route(\"/oauth/authorize\", methods=[\"GET\", \"POST\"])\ndef authorize():\n    user = current_user()\n    if not user:\n        return redirect(\n            url_for(\"home.home\", next=request.script_root + request.full_path)\n        )\n\n    try:\n        grant = authorization.get_consent_grant(end_user=user)\n    except OAuth2Error as error:\n        return authorization.handle_error_response(request, error)\n\n    if request.method == \"GET\":\n        return render_template(\"authorize.html\", user=user, grant=grant)\n\n    grant_user = user if \"confirm\" in request.form else None\n    return authorization.create_authorization_response(\n        grant=grant, grant_user=grant_user\n    )\n",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Project source file, authlib",
      "display": "src/website/routes.py",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Project full_name, authlib",
      "display": "authlib/example-oauth2-server",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Project stargazers_count, authlib",
      "display": "702",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Library name, google-auth-oauthlib",
      "display": "google-auth-oauthlib",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Monthly downloads, google-auth-oauthlib",
      "display": "124.3M",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "License, google-auth-oauthlib",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "Package release, google-auth-oauthlib",
      "display": "1.5.0",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Package release date, google-auth-oauthlib",
      "display": "Sep 2026",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Install, google-auth-oauthlib",
      "display": "python -m pip install google-auth-oauthlib==1.5.0",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Quickstart, google-auth-oauthlib",
      "display": "from google_auth_oauthlib.flow import InstalledAppFlow\n\nflow = InstalledAppFlow.from_client_secrets_file(\"client_secrets.json\", scopes=scopes)\ncredentials = flow.run_local_server(port=0)\n",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Official description, google-auth-oauthlib",
      "display": "Provides Google authentication.",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "Quickstart source file, google-auth-oauthlib",
      "display": "google_auth_oauthlib/flow.py",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Legacy OAuth client, google-auth-oauthlib",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Authorization server, google-auth-oauthlib",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "Async HTTP client, google-auth-oauthlib",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "Native role, google-auth-oauthlib",
      "display": "Google-oriented installed/web application OAuth flows on Requests-OAuthlib; returns Google credentials and supports local-browser consent.",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Project function, google-auth-oauthlib",
      "display": "def local_server_flow(\n    client_config: Mapping[str, Any], scopes: Iterable[str], port: int = 0\n) -> OAuthCredentials:\n    \"\"\"Run an OAuth flow using a local server strategy.\n\n    Creates an OAuth flow and runs `google_auth_oauthlib.flow.InstalledAppFlow.run_local_server <https://google-auth-oauthlib.readthedocs.io/en/latest/reference/google_auth_oauthlib.flow.html#google_auth_oauthlib.flow.InstalledAppFlow.run_local_server>`_.\n    This will start a local web server and open the authorization URL in\n    the user's browser.\n\n    Pass this function to ``flow`` parameter of :meth:`~gspread.oauth` to run\n    a local server flow.\n    \"\"\"\n    flow = InstalledAppFlow.from_client_config(client_config, scopes)\n    return flow.run_local_server(port=port)",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Project source file, google-auth-oauthlib",
      "display": "gspread/auth.py",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Project full_name, google-auth-oauthlib",
      "display": "burnash/gspread",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Project stargazers_count, google-auth-oauthlib",
      "display": "7.5K",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Library name, django-allauth",
      "display": "django-allauth",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Monthly downloads, django-allauth",
      "display": "7.2M",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "License, django-allauth",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "Package release, django-allauth",
      "display": "65.22.1",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Package release date, django-allauth",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Install, django-allauth",
      "display": "python -m pip install \"django-allauth[socialaccount]==65.22.1\"",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Quickstart, django-allauth",
      "display": "from django.urls import include, path\n\nurlpatterns = [path(\"accounts/\", include(\"allauth.urls\"))]\n",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Official description, django-allauth",
      "display": "Handles Django authentication, registration, account management, and social account sign-in.",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Quickstart source file, django-allauth",
      "display": "installation/quickstart.html",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Legacy OAuth client, django-allauth",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Authorization server, django-allauth",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "Async HTTP client, django-allauth",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Native role, django-allauth",
      "display": "Django account/social-login integration with many providers; optional allauth.idp supplies an OpenID Connect identity provider.",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Project function, django-allauth",
      "display": "def get_social_login(self, adapter, app, token, response):\n    \"\"\"\n    :param adapter: allauth.socialaccount Adapter subclass.\n        Usually OAuthAdapter or Auth2Adapter\n    :param app: `allauth.socialaccount.SocialApp` instance\n    :param token: `allauth.socialaccount.SocialToken` instance\n    :param response: Provider's response for OAuth1. Not used in the\n    :returns: A populated instance of the\n        `allauth.socialaccount.SocialLoginView` instance\n    \"\"\"\n    request = self._get_request()\n    social_login = adapter.complete_login(request, app, token, response=response)\n    social_login.token = token\n    return social_login",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Project source file, django-allauth",
      "display": "dj_rest_auth/registration/serializers.py",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Project full_name, django-allauth",
      "display": "iMerica/dj-rest-auth",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Project stargazers_count, django-allauth",
      "display": "1.9K",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Library name, django-oauth-toolkit",
      "display": "Django OAuth Toolkit",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Monthly downloads, django-oauth-toolkit",
      "display": "6.9M",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "License, django-oauth-toolkit",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Package release, django-oauth-toolkit",
      "display": "3.4.1",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Package release date, django-oauth-toolkit",
      "display": "Aug 2026",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Install, django-oauth-toolkit",
      "display": "python -m pip install django-oauth-toolkit==3.4.1",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Quickstart, django-oauth-toolkit",
      "display": "from django.urls import include, path\n\nurlpatterns = [path(\"o/\", include(\"oauth2_provider.urls\", namespace=\"oauth2_provider\"))]\n",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Official description, django-oauth-toolkit",
      "display": "Runs an OAuth authorization server for Django.",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Quickstart source file, django-oauth-toolkit",
      "display": "docs/getting_started.rst",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Legacy OAuth client, django-oauth-toolkit",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Authorization server, django-oauth-toolkit",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Async HTTP client, django-oauth-toolkit",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Native role, django-oauth-toolkit",
      "display": "Django OAuth2/OpenID Connect provider endpoints, application/token models, and protected-resource integration backed by OAuthlib.",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Library name, social-auth-core",
      "display": "social-auth-core",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Monthly downloads, social-auth-core",
      "display": "6.1M",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "License, social-auth-core",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Package release, social-auth-core",
      "display": "7.2.0",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "Package release date, social-auth-core",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "Install, social-auth-core",
      "display": "python -m pip install social-auth-core==7.2.0",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Quickstart, social-auth-core",
      "display": "from social_core.backends.github import GithubOAuth2\n\nbackend = GithubOAuth2(strategy=strategy, redirect_uri=redirect_uri)\nauthorization_url = backend.auth_url()\n",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Official description, social-auth-core",
      "display": "Provides social authentication for Python.",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Quickstart source file, social-auth-core",
      "display": "social_core/backends/base.py",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Legacy OAuth client, social-auth-core",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Authorization server, social-auth-core",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "Async HTTP client, social-auth-core",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "Native role, social-auth-core",
      "display": "Provider backend and authentication-pipeline core; web-framework routes/storage arrive through separately packaged integrations.",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "Project function, social-auth-core",
      "display": "def _complete(request, backend, *args, **kwargs):\n    _discard_session_partial_of_other_user(request)\n    kwargs.update(\n        user=request.user,\n        redirect_name=REDIRECT_FIELD_NAME,\n        request=request,\n    )\n    return do_complete(request.backend, _do_login, *args, **kwargs)",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "Project source file, social-auth-core",
      "display": "social_django/views.py",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "Project full_name, social-auth-core",
      "display": "python-social-auth/social-app-django",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "Project stargazers_count, social-auth-core",
      "display": "2.1K",
      "asOf": "2026-11-20"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best Python OAuth libraries Authlib Requests-OAuthlib OAuthLib HTTPX OAuth examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
