如何在Google App Engine Python中创建许可屏幕 [英] How do I create a consent screen in Google App Engine Python

查看:95
本文介绍了如何在Google App Engine Python中创建许可屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在,我已经使用webapp2一段时间使用Google App Engine for Python。到目前为止,我一直在做以下事情来访问用户帐户:

I've been using Google App Engine for Python for a while now with webapp2. Until now I've been doing the following to get access to user accounts:

    user = users.get_current_user()

然而,我很确定这不是真正的应用程序。正常的GAE应用程序有一个概念屏幕来批准,并且必须交换API密钥等。如何使用Python做到这一点?

However, I'm pretty sure that this isn't really an "app". Normal GAE apps have a concept screen to "approve" and have to exchange API keys etc, under the hood. How do I do this with Python?

谢谢!

Thanks!

推荐答案

没有像普通的GAE应用程序这样的东西,我的意思是这取决于你的应用程序在做什么。如果您想代表用户采取行动,那么您需要使用OAuth2身份验证流程,以便用户可以允许您的应用访问其数据。

There is no such thing as "normal GAE apps", I mean it really depends on what your app is doing. If you want to act on behalf of the user then yes you need to use an OAuth2 authentication flow, so the user can allow your app accessing his data.

一个好的起点您可以这个示例应用程序解释如何创建此流程用Python访问用户的Google Drive。

A good starting point for you would be this example app which explains how to create this flow in Python to access the user's Google Drive.

这篇关于如何在Google App Engine Python中创建许可屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆