@login_required
def login(request):
    github = OAuth2Session(settings.GITHUB_CLIENT_ID, scope=settings.GITHUB_SCOPES)
    authorization_url, state = github.authorization_url(settings.GITHUB_AUTHORIZATION_BASE_URL)

    request.session['oauth_state'] = state
    return redirect(authorization_url)
Step 1 of OAuth: redirect to provider.
dataset/ETHPy150Open m-vdb/github-buildservice-boilerplate/buildservice/views/oauth.py/login