简体   繁体   English

Google Cloud Endpoints:风景如画的应用程序

[英]Google Cloud Endpoints : Picturesque App

I am currently learning Google App Engine. 我目前正在学习Google App Engine。 I want to develop a cloud app that provides synchronization using Google Cloud Endpoints. 我想开发一个使用Google Cloud Endpoints提供同步的云应用程序。 Frankly, I am impressed with Picturesque App ( https://github.com/GoogleCloudPlatform/appengine-picturesque-python ) that was demonstrated during Google I/O 2013. This app shows the feature that I really need. 坦率地说,在Google I / O 2013上演示的Picturesque App( https://github.com/GoogleCloudPlatform/appengine-picturesque-python )给我留下了深刻的印象。此应用程序显示了我真正需要的功能。

To try out the application, I cloned it from GitHub and ran it through Google App Engine Launcher then when I tested it, there was no synchronization happened there. 为了试用该应用程序,我从GitHub克隆了该应用程序,并通过Google App Engine Launcher运行了该应用程序,然后在我对其进行测试时,那里没有发生任何同步。 All pictures were saved locally. 所有图片均保存在本地。 I already created and configured "settings.py" file with my Client ID as well as a "custom-js/picturesque-config.js" however I could not see Client-Server interaction in the app. 我已经使用客户端ID以及“ custom-js / picturesque-config.js”创建并配置了“ settings.py”文件,但是在该应用程序中看不到Client-Server交互。 Everything seemed to work locally. 一切似乎都在本地工作。

I also got a problem with the google authentication. 我也遇到了Google身份验证问题。 There was an error written there "Error: origin_mismatch" with all the requests details. 那里有一个错误,其中包含所有请求的详细信息“错误:origin_mismatch”。 I have been trying to fix this problem for a week but still, it could not work as expected. 我已经尝试解决了一个星期的问题,但仍然无法按预期工作。 Could anyone shed some light on this issue? 谁能在这个问题上阐明一些想法? Herewith, I list the information on the requests details. 在此,我列出了有关请求详细信息的信息。

    from_login=1
    scope=https://www.googleapis.com/auth/userinfo.email 
    https://www.googleapis.com/auth/plus.login 
    https://www.googleapis.com/auth/plus.moments.write 
    https://www.googleapis.com/auth/plus.me 
    https://www.googleapis.com/auth/plus.profile.agerange.read 
    https://www.googleapis.com/auth/plus.profile.language.read 
    https://www.googleapis.com/auth/plus.circles.members.read
    redirect_uri=postmessage
    state=519184294|0.3676346342
    origin=http://localhost:22080
    as=-5faa3d6126cb2118
    display=page
    request_visible_actions=http://schemas.google.com/AddActivity
    hl=en-GB
    cookie_policy_enforce=false
    response_type=code token id_token gsession
    access_type=online
    cookie_policy=single_host_origin
    proxy=oauth2relay412480175
    include_granted_scopes=true
    client_id=604391723960.apps.googleusercontent.com
    authuser=0

Your help would be greatly appreciated. 您的帮助将不胜感激。

Thank you 谢谢

This is an OAuth problem and the synchronization can't work if you can't sign in. 这是OAuth问题,如果您无法登录,则同步将无法进行。

As the error says, you have an "Origin Mismatch". 如错误所述,您有一个“来源不匹配”。

What are the "Redirect URIs" for your application ID in the APIs console? API控制台中应用程序ID的“重定向URI”是什么? The URI you are using -- eg http://localhost:8080 -- must match exactly, port, HTTP scheme and trailing slash. 您使用的URI(例如http://localhost:8080 )必须与端口,HTTP方案和斜杠完全匹配。

You should try to fix this error by checking out existing answers on StackOverflow: https://stackoverflow.com/search?q=error%3A+origin_mIsmatch 您应该通过检查StackOverflow上的现有答案来尝试解决此错误: https ://stackoverflow.com/search ? q = error%3A+origin_mIsmatch

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM