简体   繁体   English

如何在Google App Engine Python中创建同意屏幕

[英]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.

相关问题 如何在Google App Engine上的python中创建唯一属性? - How do I create a unique property in python on google app engine? 如何在本地Python代码中打开Goog​​le OAuth 2.0许可屏幕? - How do I open a Google OAuth 2.0 consent screen in a local Python code? 在Google App Engine中,如何创建具有特定ID的模型? - In Google App Engine, how do I create a model with a specific ID? 如何将本地Google App Engine Python数据存储区复制到本地Google App Engine Java数据存储区? - How do I copy local Google App Engine Python datastore to local Google App Engine Java datastore? 如何获取适用于Google App Engine的Python中StringProperty的值? - How do I get the value of a StringProperty in Python for Google App Engine? 如何在python中从Google App Engine查询 - How do I query from Google App Engine in python 如何使用 Google App Engine Python 3 Blobstore? - How do I use Google App Engine Python 3 Blobstore? 在python Google App Engine 中,如何将模型的所有实体导出到Google Storage 中的文件中以供开发人员使用? - In the python Google App Engine, how do I export all the entities of a model to a file in Google Storage for developers? 如何为我的Google App Engine应用设置PYTHON_PATH变量? - How do I set the PYTHON_PATH variable for my Google App Engine app? 如何在 Google App Engine 上使用 Django 创建自定义 gunicorn 设置? - How do I create a custom gunicorn setup with Django on Google App Engine?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM