本文介绍了在本地主机上为Google Apps Marketplace开发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我典型的工作流程是我在localhost上进行开发,但是对于Google Apps Marketplace来说,这是不可能的. OpenID可以正常工作,但是通过Oauth访问Data API会导致错误.

My typical workflow is that I develop on localhost, but with Google Apps Marketplace this hasn't been possible. OpenID works fine, but access to Data APIs via Oauth results in errors.

Token invalid - Invalid token: ACL not found for domain: 358xxxxxxxxx and consumer: 736xxxxxxxxx

目前,我一直在使用以下工作流程,但这很烦人.

Currently I have been using the following workflow, but it is very tiresome.

本地开发»本地推送到github»远程从github提取»远程测试»重复

local develop » local push to github » remote pull from github » remote test » repeat

有没有办法在本地开发或建议其他工作流程?

解决方案:

@koma和@JTeagle建议的混搭,我在每个分支的每个配置中都有带有Oauth键的多个分支.我还创建了一个唯一的localhost域my_project.dev ,它满足Google的要求(因为他们的localhost触发器对我不起作用)

A mashup of @koma and @JTeagle suggestions, I have multiple branches with Oauth keys in each config respective of the branch. I also created a unique localhost domain my_project.dev which satisfies Google's requirements (since their localhost trigger wasn't working for me)

推荐答案

我不确定该如何处理github,但是如果我理解得很好,很难在localhost上进行OAUTH.这确实很麻烦.

I am not sure what github as to do with it, but if I understand well, it is difficult to do OAUTH on localhost. That is indeed cumbersome.

我针对此问题的解决方案是在Google Api控制台中注册我的动态DNS域名,然后在路由器上将端口转发到我的开发计算机.

My solution for this problem is to register my dynamic DNS domainname in the Google Api Console and then do port forwarding on the router to my development machine.

这样,您的开发环境就可以处理所有OAUTH请求,并且Google的回调会触发路由器,而我可以对其进行调试.

This way, your development environment can do all the OAUTH requests and the callbacks from Google hit the router, and I can debug them.

这篇关于在本地主机上为Google Apps Marketplace开发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 19:45