{
  "id": "task_libraries:authentication/python",
  "path": "/exapedia/python-authentication-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "Python authentication libraries",
  "answer": [
    {
      "t": "text",
      "text": "Python authentication libraries verify who a user is through passwords, sessions, tokens, or sign-in with an outside identity provider. A web framework extension stores the signed-in user in a session cookie or a signed token. These libraries let web apps and APIs sign users in without writing password and token handling from scratch."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "Python authentication libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#authlib",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F132"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F133"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F141"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F136"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F134"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#flask-login-library",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F152"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F161"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F156"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#djangorestframework-simplejwt",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F171"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F175"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#django-allauth",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F190"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F191"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F192"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#django-oauth-toolkit",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F209"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F210"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F218"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F213"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F211"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#social-auth-app-django",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F224"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F233"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F228"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#django-otp",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F243"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F252"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F247"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#flask-jwt-extended",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F263"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F264"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F272"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F267"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F265"
                }
              ]
            ]
          ],
          "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": "#authlib",
          "label": [
            {
              "t": "text",
              "text": "Authlib"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F133"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Django integration",
            "OAuth/OIDC provider"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#authlib",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F132"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F142"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#flask-login-library",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F152"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#djangorestframework-simplejwt",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F171"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F182"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#django-allauth",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F190"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F199"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#django-oauth-toolkit",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F209"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F219"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#social-auth-app-django",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F224"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F234"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#django-otp",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F243"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F253"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F254"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#flask-jwt-extended",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F263"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F273"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F274"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "authlib",
          "name": [
            {
              "t": "fact",
              "fact": "F132"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/authlib/authlib"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/authlib"
            },
            {
              "label": "Docs",
              "href": "https://docs.authlib.org/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F139"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F133"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F141"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F134"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.authlib.org/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F132"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F150"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/gradio-app/gradio",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F150"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "@app.get(\"/login/huggingface\")\nasync def oauth_login(request: fastapi.Request):\n    \"\"\"Endpoint that redirects to HF OAuth page.\"\"\"\n    # Define target (where to redirect after login)\n    redirect_uri = _generate_redirect_uri(request)\n    return await oauth.huggingface.authorize_redirect(request, redirect_uri)  # type: ignore",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/gradio-app/gradio/blob/ec06278ed72e5eb73494a9d171ca851d553dc82a/gradio/oauth.py#L94-L99",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F149"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=authlib%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F132"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from authlib.integrations.requests_client import OAuth2Session\n\nwith OAuth2Session(\"example-client-id\", \"example-client-secret\", scope=\"user:email\") as client:\n    uri, state = client.create_authorization_url(\"https://github.com/login/oauth/authorize\")\n    print(uri)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://docs.authlib.org/en/stable/oauth2/client/http/index.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "index.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F137"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "flask-login-library",
          "name": [
            {
              "t": "fact",
              "fact": "F152"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/maxcountryman/flask-login"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/flask-login"
            },
            {
              "label": "Docs",
              "href": "https://flask-login.readthedocs.io/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F159"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F161"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F155"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://flask-login.readthedocs.io/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F152"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F169"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/kizniche/Mycodo",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F169"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "@blueprint.route(\"/logout\")\n@flask_login.login_required\ndef logout():\n    \"\"\"Log out of the web-ui.\"\"\"\n    user = User.query.filter(User.name == flask_login.current_user.name).first()\n    role_name = Role.query.filter(Role.id == user.role_id).first().name\n    login_log(user.name,\n              role_name,\n              request.environ.get('REMOTE_ADDR', 'unknown address'),\n              'LOGOUT')\n    # flask-login logout\n    flask_login.logout_user()\n\n    response = clear_cookie_auth()\n\n    flash(gettext(\"Successfully logged out\"), 'success')\n    return response",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/kizniche/Mycodo/blob/7541eaa69bb4d0f0c60a06adb11f3879b1ecc7e0/mycodo/mycodo_flask/routes_authentication.py#L369-L385",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F168"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=flask-login%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F152"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "import flask\nimport flask_login\n\napp = flask.Flask(__name__)\napp.secret_key = \"super secret string\"  # Change this!\n\nlogin_manager = flask_login.LoginManager()\nlogin_manager.init_app(app)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/maxcountryman/flask-login/blob/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F157"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "djangorestframework-simplejwt",
          "name": [
            {
              "t": "fact",
              "fact": "F171"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/jazzband/djangorestframework-simplejwt"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/djangorestframework-simplejwt"
            },
            {
              "label": "Docs",
              "href": "https://pypi.org/project/djangorestframework-simplejwt/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F178"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F174"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pypi.org/project/djangorestframework-simplejwt/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F171"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/iMerica/dj-rest-auth",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F188"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def jwt_encode(user):\n    from dj_rest_auth.app_settings import api_settings\n\n    JWTTokenClaimsSerializer = api_settings.JWT_TOKEN_CLAIMS_SERIALIZER\n\n    refresh = JWTTokenClaimsSerializer.get_token(user)\n    return refresh.access_token, refresh",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/iMerica/dj-rest-auth/blob/90082e3a4d257c053e5eef3f30f51cc7f55492ee/dj_rest_auth/utils.py#L9-L15",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F187"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=djangorestframework-simplejwt%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F171"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from django.urls import path\nfrom rest_framework_simplejwt.views import TokenObtainPairView\n\nurlpatterns = [\n    path(\"api/token/\", TokenObtainPairView.as_view(), name=\"token_obtain_pair\"),\n]\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://django-rest-framework-simplejwt.readthedocs.io/en/stable/getting_started.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "getting_started.rst"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F176"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "django-allauth",
          "name": [
            {
              "t": "fact",
              "fact": "F190"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/pennersr/django-allauth"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/django-allauth"
            },
            {
              "label": "Docs",
              "href": "https://docs.allauth.org/en/latest/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F36"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F191"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F193"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F192"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://docs.allauth.org/en/latest/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F190"
                    },
                    {
                      "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": "fact",
                  "fact": "F207"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/iMerica/dj-rest-auth",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F207"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def save(self, request):\n    adapter = get_adapter()\n    user = adapter.new_user(request)\n    self.cleaned_data = self.get_cleaned_data()\n    user = adapter.save_user(request, user, self, commit=False)\n    if \"password1\" in self.cleaned_data:\n        try:\n            adapter.clean_password(self.cleaned_data['password1'], user=user)\n        except DjangoValidationError as exc:\n            raise serializers.ValidationError(\n                detail=serializers.as_serializer_error(exc)\n            )\n    user.save()\n    self.custom_signup(request, user)\n    setup_user_email(request, user, [])\n    return user",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/iMerica/dj-rest-auth/blob/69ef459bdcd4a4a25121ad2064cc18a6601addb6/dj_rest_auth/registration/serializers.py#L274-L289",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F206"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Projects%20using%20django-allauth%20for%20user%20authentication&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": "F190"
                    },
                    {
                      "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://github.com/pennersr/django-allauth/blob/main/examples/regular-django/example/urls.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "urls.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F195"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "django-oauth-toolkit",
          "name": [
            {
              "t": "fact",
              "fact": "F209"
            }
          ],
          "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://pypi.org/project/django-oauth-toolkit/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F216"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F210"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F218"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F211"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pypi.org/project/django-oauth-toolkit/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F209"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from django.urls import include, path\n\nurlpatterns = [\n    path(\"o/\", include(\"oauth2_provider.urls\", namespace=\"oauth2_provider\")),\n]\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://django-oauth-toolkit.readthedocs.io/en/latest/tutorial/tutorial_01.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ],
              "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": "F209"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F214"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "social-auth-app-django",
          "name": [
            {
              "t": "fact",
              "fact": "F224"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/python-social-auth/social-app-django"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/social-auth-app-django"
            },
            {
              "label": "Docs",
              "href": "https://pypi.org/project/social-auth-app-django/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F231"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F233"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F227"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pypi.org/project/social-auth-app-django/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F224"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F241"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F242"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/zulip/zulip",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F241"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "@csrf_exempt\ndef saml_sp_metadata(request: HttpRequest) -> HttpResponse:  # nocoverage\n    \"\"\"\n    This is the view function for generating our SP metadata\n    for SAML authentication. It's meant for helping check the correctness\n    of the configuration when setting up SAML, or for obtaining the XML metadata\n    if the IdP requires it.\n    Taken from https://python-social-auth.readthedocs.io/en/latest/backends/saml.html\n    \"\"\"\n    if not saml_auth_enabled():\n        return config_error(request, \"saml\")\n\n    complete_url = reverse(\"social:complete\", args=(\"saml\",))\n    saml_backend = load_backend(load_strategy(request), \"saml\", complete_url)\n    metadata, errors = saml_backend.generate_metadata_xml()\n    if not errors:\n        return HttpResponse(content=metadata, content_type=\"text/xml\")\n\n    return HttpResponseServerError(content=\", \".join(errors))",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/zulip/zulip/blob/b7447c202368c7d05ee2c3628782d2f1af5d68f0/zerver/views/auth.py#L1343-L1361",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F240"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=social-auth-app-django%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F224"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from django.urls import include, path\n\nurlpatterns = [\n    path(\"\", include(\"social_django.urls\", namespace=\"social\")),\n]\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://python-social-auth.readthedocs.io/en/latest/configuration/django.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "django.rst"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F229"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "django-otp",
          "name": [
            {
              "t": "fact",
              "fact": "F243"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/django-otp/django-otp"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/django-otp"
            },
            {
              "label": "Docs",
              "href": "https://django-otp-official.readthedocs.io/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F250"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F252"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F246"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://django-otp-official.readthedocs.io/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F243"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F261"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F262"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/jazzband/django-two-factor-auth",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F261"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "def done(self, form_list, **kwargs):\n    \"\"\"\n    Finish the wizard. Save all forms and redirect.\n    \"\"\"\n    # Remove secret key used for QR code generation\n    try:\n        del self.request.session[self.session_key_name]\n    except KeyError:\n        pass\n\n    method = self.get_method()\n    # TOTPDeviceForm\n    if method.code == 'generator':\n        form = [form for form in form_list if isinstance(form, TOTPDeviceForm)][0]\n        device = form.save()\n\n    # PhoneNumberForm / YubiKeyDeviceForm / EmailForm / WebauthnDeviceValidationForm\n    elif method.code in ('call', 'sms', 'yubikey', 'email', 'webauthn'):\n        device = self.get_device()\n        device.confirmed = True\n        device.save()\n\n    django_otp.login(self.request, device)\n    return redirect(self.get_success_url())",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/jazzband/django-two-factor-auth/blob/a9c0b2e5d12f2848e646a8af4a251b2afc358e08/two_factor/views/core.py#L532-L555",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F260"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=django-otp%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F243"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from django.conf import settings\n\nsettings.configure(\n    SECRET_KEY=\"example-only\",\n    INSTALLED_APPS=[\"django.contrib.auth\", \"django.contrib.contenttypes\", \"django_otp\", \"django_otp.plugins.otp_hotp\"],\n    DATABASES={\"default\": {\"ENGINE\": \"django.db.backends.sqlite3\", \"NAME\": \":memory:\"}},\n    USE_TZ=True,\n)\nimport django\ndjango.setup()\nfrom django.core.management import call_command\nfrom django.contrib.auth import get_user_model\nfrom django_otp.plugins.otp_hotp.models import HOTPDevice\n\ncall_command(\"migrate\", verbosity=0)\nuser = get_user_model().objects.create_user(username=\"example\")\ndevice = HOTPDevice.objects.create(user=user, key=b\"12345678901234567890\".hex(), tolerance=0)\nprint(device.verify_token(755224))\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/django-otp/django-otp/v1.7.5/src/django_otp/plugins/otp_hotp/models.py",
                  "label": [
                    {
                      "t": "text",
                      "text": "models.py"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F248"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "flask-jwt-extended",
          "name": [
            {
              "t": "fact",
              "fact": "F263"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/vimalloc/flask-jwt-extended"
            },
            {
              "label": "PyPI",
              "href": "https://pypi.org/project/flask-jwt-extended"
            },
            {
              "label": "Docs",
              "href": "https://pypi.org/project/flask-jwt-extended/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F270"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F264"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F272"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F266"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F265"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://pypi.org/project/flask-jwt-extended/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F263"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F280"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F281"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/dpgaspar/Flask-AppBuilder",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F280"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "python",
              "code": "@expose(\"/refresh\", methods=[\"POST\"])\n@jwt_required(refresh=True)\n@safe\ndef refresh(self) -> Response:\n    \"\"\"\n        Security endpoint for the refresh token, so we can obtain a new\n        token without forcing the user to login again\n    ---\n    post:\n      description: >-\n        Use the refresh token to get a new JWT access token\n      responses:\n        200:\n          description: Refresh Successful\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  access_token:\n                    description: A new refreshed access token\n                    type: string\n        401:\n          $ref: '#/components/responses/401'\n        500:\n          $ref: '#/components/responses/500'\n      security:\n        - jwt_refresh: []\n    \"\"\"\n    resp = {\n        API_SECURITY_ACCESS_TOKEN_KEY: create_access_token(\n            identity=get_jwt_identity(), fresh=False\n        )\n    }\n    return self.response(200, **resp)",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/dpgaspar/Flask-AppBuilder/blob/44f3522df563dd8af35c87fcafd59fa2e53b4f90/flask_appbuilder/security/api.py#L123-L157",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F279"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=flask-jwt-extended%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F263"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "python",
              "code": "from flask import Flask\nfrom flask_jwt_extended import JWTManager, create_access_token\n\napp = Flask(__name__)\napp.config[\"JWT_SECRET_KEY\"] = \"super-secret\"  # Local example only; replace this key.\nJWTManager(app)\n\nwith app.app_context():\n    token = create_access_token(identity=\"example\")\n    print(token)\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://flask-jwt-extended.readthedocs.io/en/stable/basic_usage.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "basic_usage.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F268"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which Python authentication library should I use?",
      "a": [
        {
          "t": "link",
          "href": "#flask-login-library",
          "label": [
            {
              "t": "text",
              "text": "Flask-Login"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits Flask apps that manage their own user sessions. "
        },
        {
          "t": "link",
          "href": "#django-allauth",
          "label": [
            {
              "t": "text",
              "text": "django-allauth"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits Django sites that need registration and social sign-in. "
        },
        {
          "t": "link",
          "href": "#authlib",
          "label": [
            {
              "t": "text",
              "text": "Authlib"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits apps that act as OAuth or OpenID Connect clients or servers."
        }
      ]
    },
    {
      "q": "What is django-allauth?",
      "a": [
        {
          "t": "link",
          "href": "#django-allauth",
          "label": [
            {
              "t": "text",
              "text": "django-allauth"
            }
          ]
        },
        {
          "t": "text",
          "text": " provides account registration, email verification, and social sign-in for Django in one package."
        }
      ]
    },
    {
      "q": "How do I add login to a Flask app?",
      "a": [
        {
          "t": "link",
          "href": "#flask-login-library",
          "label": [
            {
              "t": "text",
              "text": "Flask-Login"
            }
          ]
        },
        {
          "t": "text",
          "text": " manages the signed-in user's session and protects views that require login. Token-based APIs use "
        },
        {
          "t": "link",
          "href": "#flask-jwt-extended",
          "label": [
            {
              "t": "text",
              "text": "Flask-JWT-Extended"
            }
          ]
        },
        {
          "t": "text",
          "text": " instead."
        }
      ]
    },
    {
      "q": "How do I add authentication to FastAPI?",
      "a": [
        {
          "t": "link",
          "href": "#authlib",
          "label": [
            {
              "t": "text",
              "text": "Authlib"
            }
          ]
        },
        {
          "t": "text",
          "text": " integrates with Starlette and FastAPI for OAuth and OpenID Connect sign-in. API routes check tokens through FastAPI security dependencies."
        }
      ]
    },
    {
      "q": "What is Authlib?",
      "a": [
        {
          "t": "link",
          "href": "#authlib",
          "label": [
            {
              "t": "text",
              "text": "Authlib"
            }
          ]
        },
        {
          "t": "text",
          "text": " builds OAuth and OpenID Connect clients and servers in Python. It integrates with Flask, Django, Starlette, and the requests and HTTPX clients."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, Flask-Login",
      "display": "Flask-Login",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, Flask-Login",
      "display": "17.7M",
      "asOf": "2026-11-16"
    },
    "F3": {
      "label": "License, Flask-Login",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, Flask-Login",
      "display": "0.6.3, Oct 2023",
      "asOf": "2023-10-30"
    },
    "F5": {
      "label": "Package release date, Flask-Login",
      "display": "Oct 2023",
      "asOf": "2023-10-30"
    },
    "F6": {
      "label": "Repository stars, Flask-Login",
      "display": "3.7K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Cookie authentication, Flask-Login",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "User registration, Flask-Login",
      "display": "Unsupported",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Password reset, Flask-Login",
      "display": "Unsupported",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Install, Flask-Login",
      "display": "pip install Flask-Login",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "What it does, Flask-Login",
      "display": "Manages user login, logout, and remembered sessions in Flask.",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "strengths lead, Flask-Login",
      "display": "Works with existing user storage",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths, Flask-Login",
      "display": "Provide a user-loading callback without adopting a specific database.",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths lead, Flask-Login",
      "display": "Distinguishes remembered and fresh logins",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths, Flask-Login",
      "display": "Use fresh_login_required when an action needs recent authentication.",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "limitations lead, Flask-Login",
      "display": "Registration belongs to the application",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations, Flask-Login",
      "display": "Add account registration and recovery outside Flask-Login.",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations lead, Flask-Login",
      "display": "Permissions stop at login status",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations, Flask-Login",
      "display": "Add role or object permissions separately.",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "Quickstart, Flask-Login",
      "display": "import flask\nimport flask_login\n\napp = flask.Flask(__name__)\napp.secret_key = \"super secret string\"  # Change this!\n\nlogin_manager = flask_login.LoginManager()\nlogin_manager.init_app(app)\n",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Project function, Flask-Login",
      "display": "@blueprint.route(\"/logout\")\n@flask_login.login_required\ndef logout():\n    \"\"\"Log out of the web-ui.\"\"\"\n    user = User.query.filter(User.name == flask_login.current_user.name).first()\n    role_name = Role.query.filter(Role.id == user.role_id).first().name\n    login_log(user.name,\n              role_name,\n              request.environ.get('REMOTE_ADDR', 'unknown address'),\n              'LOGOUT')\n    # flask-login logout\n    flask_login.logout_user()\n\n    response = clear_cookie_auth()\n\n    flash(gettext(\"Successfully logged out\"), 'success')\n    return response\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function reference, Flask-Login",
      "display": "routes_authentication.py · logout()",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project repository, Flask-Login",
      "display": "kizniche/Mycodo",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project stars, kizniche/Mycodo",
      "display": "3.3K",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project push date, kizniche/Mycodo",
      "display": "Aug 2026",
      "asOf": "2026-08-03"
    },
    "F26": {
      "label": "Library name, django-allauth",
      "display": "django-allauth",
      "asOf": "2026-11-17"
    },
    "F27": {
      "label": "Monthly downloads, django-allauth",
      "display": "6.8M",
      "asOf": "2026-11-16"
    },
    "F28": {
      "label": "License, django-allauth",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F29": {
      "label": "Package release, django-allauth",
      "display": "65.22.1, Nov 2026",
      "asOf": "2026-11-13"
    },
    "F30": {
      "label": "Package release date, django-allauth",
      "display": "Nov 2026",
      "asOf": "2026-11-13"
    },
    "F31": {
      "label": "Cookie authentication, django-allauth",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F32": {
      "label": "User registration, django-allauth",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Password reset, django-allauth",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Multi-factor login, django-allauth",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Install, django-allauth",
      "display": "pip install django-allauth",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "What it does, django-allauth",
      "display": "Provides integrated Django account registration, management, and authentication.",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "strengths lead, django-allauth",
      "display": "Combines local and social login",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "strengths, django-allauth",
      "display": "Use local accounts and external identities in the same account system.",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths lead, django-allauth",
      "display": "Supports passkeys and recovery codes",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths, django-allauth",
      "display": "Add the MFA extra for passkeys, authenticator codes, and recovery codes.",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "limitations lead, django-allauth",
      "display": "Rate limits need shared storage",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "limitations, django-allauth",
      "display": "Use a shared cache to enforce limits across application workers.",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations lead, django-allauth",
      "display": "IP limits need proxy configuration",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations, django-allauth",
      "display": "Configure trusted proxies so rate limits use the correct client address.",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "Quickstart, django-allauth",
      "display": "from django.contrib import admin\nfrom django.urls import include, path\nfrom django.views.generic.base import TemplateView\n\nfrom allauth.account.decorators import secure_admin_login\n\n\nadmin.autodiscover()\nadmin.site.login = secure_admin_login(admin.site.login)\n\nurlpatterns = [\n    path(\"\", TemplateView.as_view(template_name=\"index.html\")),\n    path(\"accounts/\", include(\"allauth.urls\")),\n    path(\"accounts/profile/\", TemplateView.as_view(template_name=\"profile.html\")),\n    path(\"admin/\", admin.site.urls),\n    path(\"i18n/\", include(\"django.conf.urls.i18n\")),\n    path(\"\", include(\"allauth.idp.urls\")),\n]\n",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "Project function, django-allauth",
      "display": "def save(self, request):\n    adapter = get_adapter()\n    user = adapter.new_user(request)\n    self.cleaned_data = self.get_cleaned_data()\n    user = adapter.save_user(request, user, self, commit=False)\n    if \"password1\" in self.cleaned_data:\n        try:\n            adapter.clean_password(self.cleaned_data['password1'], user=user)\n        except DjangoValidationError as exc:\n            raise serializers.ValidationError(\n                detail=serializers.as_serializer_error(exc)\n            )\n    user.save()\n    self.custom_signup(request, user)\n    setup_user_email(request, user, [])\n    return user\n",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Project function reference, django-allauth",
      "display": "serializers.py · save()",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project repository, django-allauth",
      "display": "iMerica/dj-rest-auth",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project stars, iMerica/dj-rest-auth",
      "display": "1.9K",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project push date, iMerica/dj-rest-auth",
      "display": "Nov 2026",
      "asOf": "2026-11-08"
    },
    "F51": {
      "label": "Library name, fastapi-users",
      "display": "FastAPI Users",
      "asOf": "2026-11-17"
    },
    "F52": {
      "label": "Monthly downloads, fastapi-users",
      "display": "1.4M",
      "asOf": "2026-11-16"
    },
    "F53": {
      "label": "License, fastapi-users",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Package release, fastapi-users",
      "display": "15.0.5, Mar 2026",
      "asOf": "2026-03-27"
    },
    "F55": {
      "label": "Package release date, fastapi-users",
      "display": "Mar 2026",
      "asOf": "2026-03-27"
    },
    "F56": {
      "label": "Repository stars, fastapi-users",
      "display": "6.3K",
      "asOf": "2026-11-17"
    },
    "F57": {
      "label": "Cookie authentication, fastapi-users",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "User registration, fastapi-users",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Password reset, fastapi-users",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Install, fastapi-users",
      "display": "pip install fastapi-users",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "What it does, fastapi-users",
      "display": "Provides customizable user registration and authentication routes for FastAPI.",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "strengths lead, fastapi-users",
      "display": "Provides account lifecycle routes",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "strengths, fastapi-users",
      "display": "Mount registration, login, password-reset, and email-verification routers.",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "strengths lead, fastapi-users",
      "display": "Separates transport from token storage",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths, fastapi-users",
      "display": "Choose cookie or header transport and a compatible authentication strategy.",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "limitations lead, fastapi-users",
      "display": "Development is in maintenance mode",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "limitations, fastapi-users",
      "display": "Expect security updates and dependency maintenance, without new features.",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "limitations lead, fastapi-users",
      "display": "JWT logout leaves tokens valid",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "limitations, fastapi-users",
      "display": "Issued JWTs remain valid until they expire.",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "Quickstart, fastapi-users",
      "display": "from contextlib import asynccontextmanager\n\nfrom fastapi import Depends, FastAPI\n\nfrom app.db import User, create_db_and_tables\nfrom app.schemas import UserCreate, UserRead, UserUpdate\nfrom app.users import auth_backend, current_active_user, fastapi_users\n\n\n@asynccontextmanager\nasync def lifespan(app: FastAPI):\n    # Not needed if you setup a migration system like Alembic\n    await create_db_and_tables()\n    yield\n\n\napp = FastAPI(lifespan=lifespan)\n\napp.include_router(\n    fastapi_users.get_auth_router(auth_backend), prefix=\"/auth/jwt\", tags=[\"auth\"]\n)\napp.include_router(\n    fastapi_users.get_register_router(UserRead, UserCreate),\n    prefix=\"/auth\",\n    tags=[\"auth\"],\n)\napp.include_router(\n    fastapi_users.get_reset_password_router(),\n    prefix=\"/auth\",\n    tags=[\"auth\"],\n)\napp.include_router(\n    fastapi_users.get_verify_router(UserRead),\n    prefix=\"/auth\",\n    tags=[\"auth\"],\n)\napp.include_router(\n    fastapi_users.get_users_router(UserRead, UserUpdate),\n    prefix=\"/users\",\n    tags=[\"users\"],\n)\n\n\n@app.get(\"/authenticated-route\")\nasync def authenticated_route(user: User = Depends(current_active_user)):\n    return {\"message\": f\"Hello {user.email}!\"}\n",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "Project function, fastapi-users",
      "display": "def generate_state_token(\n    data: Dict[str, Any],\n    secret: SecretType,\n    lifetime_seconds: int = STATE_TOKEN_LIFETIME_SECONDS,\n) -> str:\n    data[\"aud\"] = STATE_TOKEN_AUDIENCE\n\n    return generate_jwt(data, secret, lifetime_seconds)\n",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Project function reference, fastapi-users",
      "display": "users.py · generate_state_token()",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Project repository, fastapi-users",
      "display": "onyx-dot-app/onyx",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Project stars, onyx-dot-app/onyx",
      "display": "33.4K",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Project push date, onyx-dot-app/onyx",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F76": {
      "label": "Library name, Flask-Security",
      "display": "Flask-Security",
      "asOf": "2026-11-17"
    },
    "F77": {
      "label": "Monthly downloads, Flask-Security",
      "display": "79.9K",
      "asOf": "2026-11-16"
    },
    "F78": {
      "label": "License, Flask-Security",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F79": {
      "label": "Package release, Flask-Security",
      "display": "5.9.2, Oct 2026",
      "asOf": "2026-10-21"
    },
    "F80": {
      "label": "Package release date, Flask-Security",
      "display": "Oct 2026",
      "asOf": "2026-10-21"
    },
    "F81": {
      "label": "Repository stars, Flask-Security",
      "display": "699",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "Cookie authentication, Flask-Security",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "User registration, Flask-Security",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "Password reset, Flask-Security",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "Multi-factor login, Flask-Security",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "Install, Flask-Security",
      "display": "pip install flask-security[fsqla,common]",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "What it does, Flask-Security",
      "display": "Adds account authentication and recovery workflows to Flask applications.",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "strengths lead, Flask-Security",
      "display": "Provides password recovery views",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "strengths, Flask-Security",
      "display": "Send password-reset links through the configured email integration.",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "strengths lead, Flask-Security",
      "display": "MFA supports authenticator apps",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "strengths, Flask-Security",
      "display": "Use time-based codes from an authenticator app for an additional factor.",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "limitations lead, Flask-Security",
      "display": "SMS codes need a provider",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "limitations, Flask-Security",
      "display": "Configure an SMS provider before enabling text-message codes.",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "Quickstart, Flask-Security",
      "display": "import os\n\nfrom flask import Flask, render_template_string\nfrom flask_sqlalchemy import SQLAlchemy\nfrom flask_security import Security, SQLAlchemyUserDatastore, auth_required, hash_password\nfrom flask_security.models import fsqla_v3 as fsqla\n\n# Create app\napp = Flask(__name__)\napp.config['DEBUG'] = True\n\n# Generate a nice key using secrets.token_urlsafe()\napp.config['SECRET_KEY'] = os.environ.get(\"SECRET_KEY\", 'pf9Wkove4IKEAXvy-cQkeDPhv9Cb3Ag-wyJILbq_dFw')\n# Generate a good salt for password hashing using: secrets.SystemRandom().getrandbits(128)\napp.config['SECURITY_PASSWORD_SALT'] = os.environ.get(\"SECURITY_PASSWORD_SALT\", '146585145368132386173505678016728509634')\n\n# have session and remember cookie be samesite (flask/flask_login)\napp.config[\"REMEMBER_COOKIE_SAMESITE\"] = \"strict\"\napp.config[\"SESSION_COOKIE_SAMESITE\"] = \"strict\"\n\n# Use an in-memory db\napp.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite://'\n# As of Flask-SQLAlchemy 2.4.0 it is easy to pass in options directly to the\n# underlying engine. This option makes sure that DB connections from the\n# pool are still valid. Important for entire application since\n# many DBaaS options automatically close idle connections.\napp.config[\"SQLALCHEMY_ENGINE_OPTIONS\"] = {\n    \"pool_pre_ping\": True,\n}\napp.config[\"SQLALCHEMY_TRACK_MODIFICATIONS\"] = False\n\n# Create database connection object\ndb = SQLAlchemy(app)\n\n# Define models\nfsqla.FsModels.set_db_info(db)\n\nclass Role(db.Model, fsqla.FsRoleMixin):\n    pass\n\nclass User(db.Model, fsqla.FsUserMixin):\n    pass\n\n# Setup Flask-Security\nuser_datastore = SQLAlchemyUserDatastore(db, User, Role)\nsecurity = Security(app, user_datastore)\n\n# Views\n@app.route(\"/\")\n@auth_required()\ndef home():\n    return render_template_string(\"Hello {{ current_user.email }}\")\n\n# one time setup\nwith app.app_context():\n    # Create User to test with\n    db.create_all()\n    if not security.datastore.find_user(email=\"test@me.com\"):\n        security.datastore.create_user(email=\"test@me.com\", password=hash_password(\"password\"))\n    db.session.commit()\n\nif __name__ == '__main__':\n    app.run()\n\n",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "Project function, Flask-Security",
      "display": "def build_sample_db():\n    \"\"\"\n    Populate a small db with some example entries.\n    \"\"\"\n    db.drop_all()\n    db.create_all()\n\n    with app.app_context():\n        user_role = Role(name=\"user\")\n        super_user_role = Role(name=\"superuser\")\n        db.session.add(user_role)\n        db.session.add(super_user_role)\n        db.session.commit()\n\n        user_datastore.create_user(\n            first_name=\"Admin\",\n            email=\"admin@example.com\",\n            password=hash_password(\"admin\"),\n            roles=[user_role, super_user_role],\n        )\n\n        for name, surname in zip(first_names, last_names, strict=True):\n            tmp_email = f\"{name.lower()}.{surname.lower()}@example.com\"\n            tmp_pass = \"\".join(\n                random.choice(string.ascii_lowercase + string.digits) for i in range(10)\n            )\n            user_datastore.create_user(\n                first_name=name,\n                last_name=surname,\n                email=tmp_email,\n                password=hash_password(tmp_pass),\n                roles=[\n                    user_role,\n                ],\n            )\n        db.session.commit()\n    return\n",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "Project function reference, Flask-Security",
      "display": "main.py · build_sample_db()",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "Project repository, Flask-Security",
      "display": "pallets-eco/flask-admin",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Project stars, pallets-eco/flask-admin",
      "display": "6.1K",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Project push date, pallets-eco/flask-admin",
      "display": "Nov 2026",
      "asOf": "2026-11-14"
    },
    "F100": {
      "label": "Developer need",
      "display": "Keeping an existing Flask user store",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Why choose Flask-Login",
      "display": "database-independent user loading",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Developer need in introduction",
      "display": "keeping an existing Flask user store",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "When to consider Flask-Security",
      "display": "a Flask password-recovery workflow is required",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Developer need",
      "display": "Adding password recovery to Flask",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Why choose Flask-Security",
      "display": "configured password recovery views",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Developer need in introduction",
      "display": "adding password recovery to Flask",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Developer need",
      "display": "Combining Django account identities",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Why choose django-allauth",
      "display": "integrated local and social login",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Developer need in introduction",
      "display": "combining Django account identities",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "When to consider fastapi-users",
      "display": "building with FastAPI instead of Django",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "Developer need",
      "display": "Mounting FastAPI account routes",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "Why choose fastapi-users",
      "display": "ready-to-use lifecycle routers",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "Developer need in introduction",
      "display": "mounting FastAPI account routes",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "When to consider django-allauth",
      "display": "building with Django instead of FastAPI",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "Page introduction",
      "display": "Python authentication libraries let application developers add sign-in and identity checks.",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "FAQ: Does Flask-Login create accounts or reset passwords?",
      "display": "It explicitly excludes user registration and account recovery.",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "FAQ: Does Flask-Login require a particular database?",
      "display": "It is not bound to a database; the application supplies a user-loading callback.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "FAQ: Can a remembered login satisfy a fresh-login check?",
      "display": "A restored remember-me login is non-fresh; fresh_login_required checks for recent authentication.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: Does Flask-Login provide role permissions?",
      "display": "Its permission scope stops at whether the user is logged in.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: Does Flask-Security supply the SMS delivery service?",
      "display": "Its two-factor feature lists SMS as an option but does not provide the SMS service.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: What is the maintained Flask-Security distribution?",
      "display": "The maintained repository publishes both Flask-Security and Flask-Security-Too and recommends flask-security.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: What does django-allauth need for MFA?",
      "display": "Install its mfa extra and add allauth.mfa to the Django project.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: Do django-allauth rate limits work with a process-local cache?",
      "display": "Reliable multi-process enforcement requires a cache shared by all workers.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: What needs configuring behind a reverse proxy?",
      "display": "The allauth rate limiter needs trusted-proxy/IP-header settings matching the deployment.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "FAQ: Does a cookie imply server-side token revocation?",
      "display": "FastAPI Users separates cookie/header transports from JWT, database, and Redis strategies.",
      "asOf": "2026-11-17"
    },
    "F126": {
      "label": "FAQ: Does a cookie imply server-side token revocation?",
      "display": "Its JWT strategy leaves issued tokens valid until expiry after logout.",
      "asOf": "2026-11-17"
    },
    "F127": {
      "label": "FAQ: Will FastAPI Users receive new features?",
      "display": "It is in maintenance mode with security updates and dependency maintenance, without new features.",
      "asOf": "2026-11-17"
    },
    "F128": {
      "label": "FAQ: Which framework does each integration fit?",
      "display": "Flask-Login manages sessions for Flask.",
      "asOf": "2026-11-17"
    },
    "F129": {
      "label": "FAQ: Which framework does each integration fit?",
      "display": "Flask-Security adds security features to Flask.",
      "asOf": "2026-11-17"
    },
    "F130": {
      "label": "FAQ: Which framework does each integration fit?",
      "display": "django-allauth integrates account functionality into Django.",
      "asOf": "2026-11-17"
    },
    "F131": {
      "label": "FAQ: Which framework does each integration fit?",
      "display": "FastAPI Users adds registration and authentication to FastAPI.",
      "asOf": "2026-11-17"
    },
    "F132": {
      "label": "Library name, authlib",
      "display": "Authlib",
      "asOf": "2026-11-20"
    },
    "F133": {
      "label": "Monthly downloads, authlib",
      "display": "137.9M",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "License, authlib",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "Package release, authlib",
      "display": "1.9.9",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Package release date, authlib",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "Install, authlib",
      "display": "pip install Authlib requests",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Quickstart, authlib",
      "display": "from authlib.integrations.requests_client import OAuth2Session\n\nwith OAuth2Session(\"example-client-id\", \"example-client-secret\", scope=\"user:email\") as client:\n    uri, state = client.create_authorization_url(\"https://github.com/login/oauth/authorize\")\n    print(uri)\n",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Official description, authlib",
      "display": "Builds OAuth and OpenID Connect servers and clients.",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Quickstart source file, authlib",
      "display": "oauth2/client/http/index.html",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Repository stars, authlib",
      "display": "5.5K",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Django integration, authlib",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "OAuth/OIDC provider, authlib",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "Primary role, authlib",
      "display": "OAuth/OIDC client and provider building blocks",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Python requirement, authlib",
      "display": ">=3.10",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Frameworks, authlib",
      "display": "Flask, Django, Starlette, and FastAPI integrations",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "Async transport, authlib",
      "display": "HTTPX compatibility layer for async integration",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Project function, authlib",
      "display": "@app.get(\"/login/huggingface\")\nasync def oauth_login(request: fastapi.Request):\n    \"\"\"Endpoint that redirects to HF OAuth page.\"\"\"\n    # Define target (where to redirect after login)\n    redirect_uri = _generate_redirect_uri(request)\n    return await oauth.huggingface.authorize_redirect(request, redirect_uri)  # type: ignore",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Project source file, authlib",
      "display": "gradio/oauth.py",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Project full_name, authlib",
      "display": "gradio-app/gradio",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Project stargazers_count, authlib",
      "display": "44.1K",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Library name, flask-login",
      "display": "Flask-Login",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Monthly downloads, flask-login",
      "display": "18.6M",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "License, flask-login",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "Package release, flask-login",
      "display": "0.6.3",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Package release date, flask-login",
      "display": "Oct 2023",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Install, flask-login",
      "display": "pip install flask-login",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Quickstart, flask-login",
      "display": "import flask\nimport flask_login\n\napp = flask.Flask(__name__)\napp.secret_key = \"super secret string\"  # Change this!\n\nlogin_manager = flask_login.LoginManager()\nlogin_manager.init_app(app)\n",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Official description, flask-login",
      "display": "Manages user authentication and sessions for Flask.",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Quickstart source file, flask-login",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Repository stars, flask-login",
      "display": "3.7K",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Django integration, flask-login",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "OAuth/OIDC provider, flask-login",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "Primary role, flask-login",
      "display": "Flask login/logout and remembered user sessions",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Python requirement, flask-login",
      "display": ">=3.7",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Account storage, flask-login",
      "display": "Application-supplied user loader and authentication",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Project function, flask-login",
      "display": "@blueprint.route(\"/logout\")\n@flask_login.login_required\ndef logout():\n    \"\"\"Log out of the web-ui.\"\"\"\n    user = User.query.filter(User.name == flask_login.current_user.name).first()\n    role_name = Role.query.filter(Role.id == user.role_id).first().name\n    login_log(user.name,\n              role_name,\n              request.environ.get('REMOTE_ADDR', 'unknown address'),\n              'LOGOUT')\n    # flask-login logout\n    flask_login.logout_user()\n\n    response = clear_cookie_auth()\n\n    flash(gettext(\"Successfully logged out\"), 'success')\n    return response",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Project source file, flask-login",
      "display": "mycodo/mycodo_flask/routes_authentication.py",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Project full_name, flask-login",
      "display": "kizniche/Mycodo",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Project stargazers_count, flask-login",
      "display": "3.3K",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Library name, djangorestframework-simplejwt",
      "display": "Simple JWT",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Monthly downloads, djangorestframework-simplejwt",
      "display": "8.4M",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "License, djangorestframework-simplejwt",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Package release, djangorestframework-simplejwt",
      "display": "5.5.1",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Package release date, djangorestframework-simplejwt",
      "display": "Jul 2025",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Install, djangorestframework-simplejwt",
      "display": "pip install djangorestframework-simplejwt",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "Quickstart, djangorestframework-simplejwt",
      "display": "from django.urls import path\nfrom rest_framework_simplejwt.views import TokenObtainPairView\n\nurlpatterns = [\n    path(\"api/token/\", TokenObtainPairView.as_view(), name=\"token_obtain_pair\"),\n]\n",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Official description, djangorestframework-simplejwt",
      "display": "Adds JSON Web Token authentication to Django REST Framework.",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "Quickstart source file, djangorestframework-simplejwt",
      "display": "getting_started.rst",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Repository stars, djangorestframework-simplejwt",
      "display": "4.3K",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "Django integration, djangorestframework-simplejwt",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "OAuth/OIDC provider, djangorestframework-simplejwt",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Primary role, djangorestframework-simplejwt",
      "display": "JWT authentication for Django REST Framework",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Python requirement, djangorestframework-simplejwt",
      "display": ">=3.9",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "User activity check, djangorestframework-simplejwt",
      "display": "for_user does not check is_active",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Project function, djangorestframework-simplejwt",
      "display": "def jwt_encode(user):\n    from dj_rest_auth.app_settings import api_settings\n\n    JWTTokenClaimsSerializer = api_settings.JWT_TOKEN_CLAIMS_SERIALIZER\n\n    refresh = JWTTokenClaimsSerializer.get_token(user)\n    return refresh.access_token, refresh",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Project source file, djangorestframework-simplejwt",
      "display": "dj_rest_auth/utils.py",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Project full_name, djangorestframework-simplejwt",
      "display": "iMerica/dj-rest-auth",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "Project stargazers_count, djangorestframework-simplejwt",
      "display": "1.9K",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "Library name, django-allauth",
      "display": "django-allauth",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Monthly downloads, django-allauth",
      "display": "7.2M",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "License, django-allauth",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Package release, django-allauth",
      "display": "65.22.1",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Package release date, django-allauth",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "Install, django-allauth",
      "display": "pip install django-allauth",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Quickstart, django-allauth",
      "display": "from django.urls import include, path\n\nurlpatterns = [path(\"accounts/\", include(\"allauth.urls\"))]\n",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Repository stars, django-allauth",
      "display": "10.4K",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "Django integration, django-allauth",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "OAuth/OIDC provider, django-allauth",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Primary role, django-allauth",
      "display": "Accounts, social authentication, MFA, headless auth, and OIDC provider",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Python requirement, django-allauth",
      "display": ">=3.11",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Headless access tokens, django-allauth",
      "display": "Custom token strategy can return an access token",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Upstream source location, django-allauth",
      "display": "Published package points to Codeberg",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "OIDC provider grant scope, django-allauth",
      "display": "Authorization code, client credentials, implicit, and device authorization",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Project function, django-allauth",
      "display": "def save(self, request):\n    adapter = get_adapter()\n    user = adapter.new_user(request)\n    self.cleaned_data = self.get_cleaned_data()\n    user = adapter.save_user(request, user, self, commit=False)\n    if \"password1\" in self.cleaned_data:\n        try:\n            adapter.clean_password(self.cleaned_data['password1'], user=user)\n        except DjangoValidationError as exc:\n            raise serializers.ValidationError(\n                detail=serializers.as_serializer_error(exc)\n            )\n    user.save()\n    self.custom_signup(request, user)\n    setup_user_email(request, user, [])\n    return user",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Project source file, django-allauth",
      "display": "dj_rest_auth/registration/serializers.py",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "Project full_name, django-allauth",
      "display": "iMerica/dj-rest-auth",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Project stargazers_count, django-allauth",
      "display": "1.9K",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Library name, django-oauth-toolkit",
      "display": "Django OAuth Toolkit",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Monthly downloads, django-oauth-toolkit",
      "display": "6.8M",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "License, django-oauth-toolkit",
      "display": "BSD-2-Clause",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Package release, django-oauth-toolkit",
      "display": "3.4.1",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Package release date, django-oauth-toolkit",
      "display": "Aug 2026",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Install, django-oauth-toolkit",
      "display": "pip install django-oauth-toolkit",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "Quickstart, django-oauth-toolkit",
      "display": "from django.urls import include, path\n\nurlpatterns = [\n    path(\"o/\", include(\"oauth2_provider.urls\", namespace=\"oauth2_provider\")),\n]\n",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Official description, django-oauth-toolkit",
      "display": "Runs an OAuth authorization server inside Django.",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Quickstart source file, django-oauth-toolkit",
      "display": "docs/tutorial/tutorial_01.rst",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Repository stars, django-oauth-toolkit",
      "display": "3.3K",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Django integration, django-oauth-toolkit",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "OAuth/OIDC provider, django-oauth-toolkit",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Primary role, django-oauth-toolkit",
      "display": "OAuth2 authorization/resource server within Django",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Python requirement, django-oauth-toolkit",
      "display": ">=3.10",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "MCP authorization, django-oauth-toolkit",
      "display": "Authorization-server role supported from3.4.0",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Library name, social-auth-app-django",
      "display": "social-auth-app-django",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Monthly downloads, social-auth-app-django",
      "display": "5.9M",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "License, social-auth-app-django",
      "display": "BSD-3-Clause",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Package release, social-auth-app-django",
      "display": "8.1.0",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Package release date, social-auth-app-django",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Install, social-auth-app-django",
      "display": "pip install social-auth-app-django",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Quickstart, social-auth-app-django",
      "display": "from django.urls import include, path\n\nurlpatterns = [\n    path(\"\", include(\"social_django.urls\", namespace=\"social\")),\n]\n",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Official description, social-auth-app-django",
      "display": "Integrates Python Social Auth with Django.",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Quickstart source file, social-auth-app-django",
      "display": "docs/configuration/django.rst",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Repository stars, social-auth-app-django",
      "display": "2.1K",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Django integration, social-auth-app-django",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "OAuth/OIDC provider, social-auth-app-django",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Primary role, social-auth-app-django",
      "display": "Django integration for Python Social Auth provider backends",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Python requirement, social-auth-app-django",
      "display": ">=3.11",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "Required backend core, social-auth-app-django",
      "display": "social-auth-core>=7.2.0,<8.0.0 and Django>=5.2",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "Project function, social-auth-app-django",
      "display": "@csrf_exempt\ndef saml_sp_metadata(request: HttpRequest) -> HttpResponse:  # nocoverage\n    \"\"\"\n    This is the view function for generating our SP metadata\n    for SAML authentication. It's meant for helping check the correctness\n    of the configuration when setting up SAML, or for obtaining the XML metadata\n    if the IdP requires it.\n    Taken from https://python-social-auth.readthedocs.io/en/latest/backends/saml.html\n    \"\"\"\n    if not saml_auth_enabled():\n        return config_error(request, \"saml\")\n\n    complete_url = reverse(\"social:complete\", args=(\"saml\",))\n    saml_backend = load_backend(load_strategy(request), \"saml\", complete_url)\n    metadata, errors = saml_backend.generate_metadata_xml()\n    if not errors:\n        return HttpResponse(content=metadata, content_type=\"text/xml\")\n\n    return HttpResponseServerError(content=\", \".join(errors))",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Project source file, social-auth-app-django",
      "display": "zerver/views/auth.py",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Project full_name, social-auth-app-django",
      "display": "zulip/zulip",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Project stargazers_count, social-auth-app-django",
      "display": "26.3K",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Library name, django-otp",
      "display": "django-otp",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Monthly downloads, django-otp",
      "display": "5.7M",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "License, django-otp",
      "display": "Unlicense",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "Package release, django-otp",
      "display": "1.7.5",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "Package release date, django-otp",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "Install, django-otp",
      "display": "pip install django-otp",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "Quickstart, django-otp",
      "display": "from django.conf import settings\n\nsettings.configure(\n    SECRET_KEY=\"example-only\",\n    INSTALLED_APPS=[\"django.contrib.auth\", \"django.contrib.contenttypes\", \"django_otp\", \"django_otp.plugins.otp_hotp\"],\n    DATABASES={\"default\": {\"ENGINE\": \"django.db.backends.sqlite3\", \"NAME\": \":memory:\"}},\n    USE_TZ=True,\n)\nimport django\ndjango.setup()\nfrom django.core.management import call_command\nfrom django.contrib.auth import get_user_model\nfrom django_otp.plugins.otp_hotp.models import HOTPDevice\n\ncall_command(\"migrate\", verbosity=0)\nuser = get_user_model().objects.create_user(username=\"example\")\ndevice = HOTPDevice.objects.create(user=user, key=b\"12345678901234567890\".hex(), tolerance=0)\nprint(device.verify_token(755224))\n",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "Official description, django-otp",
      "display": "Adds two-factor authentication with one-time passwords to Django.",
      "asOf": "2026-11-20"
    },
    "F251": {
      "label": "Quickstart source file, django-otp",
      "display": "src/django_otp/plugins/otp_hotp/models.py",
      "asOf": "2026-11-20"
    },
    "F252": {
      "label": "Repository stars, django-otp",
      "display": "629",
      "asOf": "2026-11-20"
    },
    "F253": {
      "label": "Django integration, django-otp",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F254": {
      "label": "OAuth/OIDC provider, django-otp",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F255": {
      "label": "Primary role, django-otp",
      "display": "OTP devices and verification layered on Django authentication",
      "asOf": "2026-11-20"
    },
    "F256": {
      "label": "Python requirement, django-otp",
      "display": ">=3.8",
      "asOf": "2026-11-20"
    },
    "F257": {
      "label": "Enrollment UI, django-otp",
      "display": "No standard device-management UI outside admin",
      "asOf": "2026-11-20"
    },
    "F258": {
      "label": "Verified identity, django-otp",
      "display": "Authenticated and OTP-verified are separate states",
      "asOf": "2026-11-20"
    },
    "F259": {
      "label": "Project function, django-otp",
      "display": "def done(self, form_list, **kwargs):\n    \"\"\"\n    Finish the wizard. Save all forms and redirect.\n    \"\"\"\n    # Remove secret key used for QR code generation\n    try:\n        del self.request.session[self.session_key_name]\n    except KeyError:\n        pass\n\n    method = self.get_method()\n    # TOTPDeviceForm\n    if method.code == 'generator':\n        form = [form for form in form_list if isinstance(form, TOTPDeviceForm)][0]\n        device = form.save()\n\n    # PhoneNumberForm / YubiKeyDeviceForm / EmailForm / WebauthnDeviceValidationForm\n    elif method.code in ('call', 'sms', 'yubikey', 'email', 'webauthn'):\n        device = self.get_device()\n        device.confirmed = True\n        device.save()\n\n    django_otp.login(self.request, device)\n    return redirect(self.get_success_url())",
      "asOf": "2026-11-20"
    },
    "F260": {
      "label": "Project source file, django-otp",
      "display": "two_factor/views/core.py",
      "asOf": "2026-11-20"
    },
    "F261": {
      "label": "Project full_name, django-otp",
      "display": "jazzband/django-two-factor-auth",
      "asOf": "2026-11-20"
    },
    "F262": {
      "label": "Project stargazers_count, django-otp",
      "display": "1.9K",
      "asOf": "2026-11-20"
    },
    "F263": {
      "label": "Library name, flask-jwt-extended",
      "display": "Flask-JWT-Extended",
      "asOf": "2026-11-20"
    },
    "F264": {
      "label": "Monthly downloads, flask-jwt-extended",
      "display": "5.2M",
      "asOf": "2026-11-20"
    },
    "F265": {
      "label": "License, flask-jwt-extended",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F266": {
      "label": "Package release, flask-jwt-extended",
      "display": "4.7.4",
      "asOf": "2026-11-20"
    },
    "F267": {
      "label": "Package release date, flask-jwt-extended",
      "display": "May 2026",
      "asOf": "2026-11-20"
    },
    "F268": {
      "label": "Install, flask-jwt-extended",
      "display": "pip install flask-jwt-extended",
      "asOf": "2026-11-20"
    },
    "F269": {
      "label": "Quickstart, flask-jwt-extended",
      "display": "from flask import Flask\nfrom flask_jwt_extended import JWTManager, create_access_token\n\napp = Flask(__name__)\napp.config[\"JWT_SECRET_KEY\"] = \"super-secret\"  # Local example only; replace this key.\nJWTManager(app)\n\nwith app.app_context():\n    token = create_access_token(identity=\"example\")\n    print(token)\n",
      "asOf": "2026-11-20"
    },
    "F270": {
      "label": "Official description, flask-jwt-extended",
      "display": "Adds JWT support to Flask.",
      "asOf": "2026-11-20"
    },
    "F271": {
      "label": "Quickstart source file, flask-jwt-extended",
      "display": "docs/basic_usage.rst and Flask.app_context API reference",
      "asOf": "2026-11-20"
    },
    "F272": {
      "label": "Repository stars, flask-jwt-extended",
      "display": "1.6K",
      "asOf": "2026-11-20"
    },
    "F273": {
      "label": "Django integration, flask-jwt-extended",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F274": {
      "label": "OAuth/OIDC provider, flask-jwt-extended",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F275": {
      "label": "Primary role, flask-jwt-extended",
      "display": "JWT creation, request protection, and identity lookup in Flask",
      "asOf": "2026-11-20"
    },
    "F276": {
      "label": "Python requirement, flask-jwt-extended",
      "display": "<4,>=3.10",
      "asOf": "2026-11-20"
    },
    "F277": {
      "label": "Refresh and freshness, flask-jwt-extended",
      "display": "Refresh token guard can issue nonfresh access tokens",
      "asOf": "2026-11-20"
    },
    "F278": {
      "label": "Project function, flask-jwt-extended",
      "display": "@expose(\"/refresh\", methods=[\"POST\"])\n@jwt_required(refresh=True)\n@safe\ndef refresh(self) -> Response:\n    \"\"\"\n        Security endpoint for the refresh token, so we can obtain a new\n        token without forcing the user to login again\n    ---\n    post:\n      description: >-\n        Use the refresh token to get a new JWT access token\n      responses:\n        200:\n          description: Refresh Successful\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  access_token:\n                    description: A new refreshed access token\n                    type: string\n        401:\n          $ref: '#/components/responses/401'\n        500:\n          $ref: '#/components/responses/500'\n      security:\n        - jwt_refresh: []\n    \"\"\"\n    resp = {\n        API_SECURITY_ACCESS_TOKEN_KEY: create_access_token(\n            identity=get_jwt_identity(), fresh=False\n        )\n    }\n    return self.response(200, **resp)",
      "asOf": "2026-11-20"
    },
    "F279": {
      "label": "Project source file, flask-jwt-extended",
      "display": "flask_appbuilder/security/api.py",
      "asOf": "2026-11-20"
    },
    "F280": {
      "label": "Project full_name, flask-jwt-extended",
      "display": "dpgaspar/Flask-AppBuilder",
      "asOf": "2026-11-20"
    },
    "F281": {
      "label": "Project stargazers_count, flask-jwt-extended",
      "display": "5.0K",
      "asOf": "2026-11-20"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best Python authentication libraries Flask Login Flask Security django allauth FastAPI Users code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
