Search code examples
pythongoogle-app-enginegoogle-apps-marketplace

Google App Engine and the Google Apps Marketplace


I am a new developer to all things web design.

I have developed an application on Google App Engine and a recent client wanted to publish it on the Google Apps Marketplace. I simply added the client as an app owner to give him the ability to publish the app. He published the app on the marketplace and received this email (abbreviated):

"Your recently submitted application for the Google Apps Marketplace, ..., did not meet the OAuth2 requirements for the Google App Marketplace. More specifically, it appears that you have built your application via appengine.google.com rather than within the Google Cloud Console, https://cloud.google.com/console. The issue is that the appengine interface doesn't allow you to utilize OAuth2 which is required for the Google App Marketplace. Check out our documentation for more information about OAuth2 and how to use it with your application."

I find this very confusing because my appengine project uses OAuth2 as a service account for everything except the user login, where I simply use the User object given by google.appengine.api to check if the user is logged in. Am I to understand that you cannot use Google App Engine with the Google Apps Marketplace? Or is this simply a case of not using an appropriate login method?


Solution

  • This is very stupid. I've also faced that when I started integrated with Google Apps Marketplace. Basically you need to do 2 things:

    1. Use Federated Login as Authentication Type of your application
    2. Create handler for /_ah/login_required URI which will sign in automatically

    I've used Gaelyk for the second point where it was pretty simple to reuse the UserService:

    redirect users.createLoginURL(params['continue'], null, params.hd, [] as Set)

    In plain old Java it might be more verbose but I hope you get the picture.