google app engine - "scope not allowed" on localhost only -


i'm getting started google app engine java, , using google cloud endpoints oauth 2.0. have 1 simple endpoint working correctly, when deployed. when run on local machine error:

mar 10, 2014 4:38:54 pm com.google.api.server.spi.webapisuserservice getcurrentuser info: getcurrentuser: accesstoken; scope not allowed 

here endpoint code:

@api(     name = "sd",     version = "v1",     scopes = { constants.email_scope },     clientids = { constants.web_client_id, constants.api_explorer_client_id }) public class feeds {      public feed sample(user user) {          if (user == null) {             return new feed("public feed.");         } else {             return new feed("feed " + user.getemail());         }     } } 

...

public class constants {     public static final string web_client_id = "<snip>.apps.googleusercontent.com";     public static final string email_scope = "https://www.googleapis.com/auth/userinfo.email";     public static final string api_explorer_client_id = com.google.api.server.spi.constant.api_explorer_client_id; } 

as said, when deploy , access via api explorer in works perfectly. when have oauth toggle on, returns feed <my email address>, , when turn off returns public feed.

however, when run against local machine returns public feed. when oauth toggle on, prints error pasted @ top of post server's console. accessing 2 api explorers urls https://<app_id>.appspot.com/_ah/api/explorer , http://localhost:8888/_ah/api/explorer.

can help?


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -