(request: HttpRequest)
return HttpResponse()
OAuth callback handler from GitHub.
    We get a code from GitHub that we can use with our client secret to get an
    OAuth token for a GitHub user. The GitHub OAuth token only expires when the
    user uninstalls the app.
    https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#2-users-are-redirected-back-to-your-site-by-github
OAuth callback handler from GitHub.
    We get a code from GitHub that we can use with our client secret to get an
    OAuth token for a GitHub user. The GitHub OAuth token only expires when the
    user uninstalls the app.
    https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#2-users-are-redirected-back-to-your-site-by-github
OAuth callback handler from GitHub . We get a code from GitHub that we can use with our client secret to get an OAuth token for a GitHub user . The GitHub OAuth token only expires when the user uninstalls the app . https : // developer . github . com / apps / building - github - apps / identifying - and - authorizing - users - for - github - apps / #2 - users - are - redirected - back - to - your - site - by - github
def oauth_complete(request: HttpRequest) -> HttpResponse:
    """
    OAuth callback handler from GitHub.
    We get a code from GitHub that we can use with our client secret to get an
    OAuth token for a GitHub user. The GitHub OAuth token only expires when the
    user uninstalls the app.
    https://developer.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#2-users-are-redirected-back-to-your-site-by-github
    """
    if request.method == "POST":
        login_result = process_login_request(request)
        return JsonResponse(asdict(login_result))
    return HttpResponse()
def oauth_complete ( request : HttpRequest ) -> HttpResponse : if request . method == "POST" : login_result = process_login_request ( request ) return JsonResponse ( asdict ( login_result ) ) return HttpResponse ( )