oauth2_app.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:python-mautic 作者: divio 项目源码 文件源码
def index():
    """Step 1: User Authorization.

    Redirect the user/resource owner to the OAuth provider using an URL with a few key OAuth parameters.
    """
    mautic = OAuth2Session(client_id, redirect_uri=redirect_uri)
    authorization_url, state = mautic.authorization_url(authorization_base_url, grant_type='authorization_code')

    session['oauth_state'] = state
    return redirect(authorization_url)


# Step 2: User authorization, this happens on the provider.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号