1

Or put another way...

I just moved my app from aaa.appspot.com to a new project (and hence new Client ID) called bbb.appspot.com. When I went to add the new Client Id to my GCE API definitions, it was already there!

So, on the one hand, it's magic :-)

On the other hand, is all of this documented anywhere? I have a slight concern about how I would go about overriding this behaviour if ever I want to manually configure the permitted client IDs.

pinoyyid
  • 21,499
  • 14
  • 64
  • 115

1 Answers1

1

I assume you are talking about the API annotations for GCE like this:

@ApiMethod(
          name = "testAuth",
    clientIds = { WEB_CLIENT_ID,
            APP1_ANDROID_CLIENT_ID, APP1D_ANDROID_CLIENT_ID,
            APP2_ANDROID_CLIENT_ID },
    audiences = { Config.WEB_CLIENT_ID }        
)

These client ID's come from the API console, where they are created based on your app's package and the hash of your app's certificate.

So, you may create a new GAE project for your new app id, and even create a new console project connected to that new GAE project, but your old console project still exists and still has client id's that are specific to your Android project but independent of your GAE project - so they still work.

Tom
  • 17,103
  • 8
  • 67
  • 75
  • Hi Tom, yes those client IDs and the behaviour you describe. Is there any documentation? eg. if I want to disable some client IDs, do I need to delete the project, if I delete the client IDs, will they be recreated by a refresh, if I manually add my own Client IDs (not related to a console project) will they be lost on a refresh, etc? – pinoyyid Nov 18 '13 at 04:12
  • I wasn't aware you could create your own Client ID's - I thought they had to be registered by creating them as part of console/api project. If you delete the ones from the old project, you should re-create them in your new project - they won't get automatically recreated. I'm not aware of any documentation for this stuff - I got it from the endpoints docs and those were very incomplete. – Tom Nov 18 '13 at 15:29
  • "I wasn't aware you could create your own Client ID's". I wasn't aware you couldn't :-( For me the whole point of a REST API is that it can be published for third party apps to make use of. If they are only usable by my own app, then they are pretty pointless. I might as well use my own RPC or something like Apache Thrift. – pinoyyid Nov 18 '13 at 15:45
  • I saw a post where a GCE team member said that - in this first incarnation - GCE was not designed for creating a public API. So, if neither the client library generation, nor the simplified OAUTH is import, then maybe GCE isn't right for you. Given that it creates GAE lock-in, I wonder if it is over-used. – Tom Nov 18 '13 at 19:56
  • I hadn't seen that. Thanks for the heads up. – pinoyyid Nov 19 '13 at 05:45