I recently started to explore the Google Identity Kit using golang on the App Engine. I was going off of the samples in the googlesamples/identity-toolkit-go. In looking at the code, I found some appengine packages for the following:
"google.golang.org/appengine"
"google.golang.org/appengine/datastore"
For the GAE Golang application that I am working on, I use the GAE SDK to run the application using goapp run
. However, in my code, I only reference
"appengine"
"appengine/datastore"
because this points to the golang src located in the extracted go appengine sdk.
Do I need to be using the google.golang.org
appengine packages instead?
I only found this out after realizing that the appengine.Context that is expected by the identity kit methods did not match what I was using. I received this error
`cannot use c (type "appengine".Context) as type "golang.org/x/net/context".Context in argument to client.ValidateToken. "appengine".Context does not implement "golang.org/x/net/context".Context (missing Deadline method)`
despite me using appengine.NewContext(r)
as the example explained.