[英]How do I create a consent screen in Google App Engine Python
I've been using Google App Engine for Python for a while now with webapp2. 我已经使用webapp2使用Python的Google App Engine已有一段时间了。 Until now I've been doing the following to get access to user accounts: 到目前为止,我一直在执行以下操作以访问用户帐户:
user = users.get_current_user()
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. 普通的GAE应用在后台有一个“批准”概念屏幕,并且必须交换API密钥等。 How do I do this with Python? 如何使用Python执行此操作?
Thanks! 谢谢!
There is no such thing as "normal GAE apps", I mean it really depends on what your app is doing. 没有“普通GAE应用程序”之类的东西,我的意思是,这实际上取决于您的应用程序在做什么。 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. 如果您想代表用户行事,那么是的,您需要使用OAuth2身份验证流程,以便用户可以允许您的应用访问其数据。
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. 这个示例应用程序是一个很好的起点,它说明了如何在Python中创建此流程以访问用户的Google云端硬盘。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.