Giter VIP home page Giter VIP logo

Comments (9)

addisonjones3 avatar addisonjones3 commented on June 19, 2024 10

I was having the same problem as well.

A workaround is to configure as stated in the instructions, then when running go run quickstart.go, follow the URL printed to stdout. That will lead you through the consent page and eventually redirect to localhost. That localhost call won't go anywhere, but if you copy the code={copy the value here}&state... from the URL into the terminal window and paste, it will complete the token request flow and the sample will list the labels as intended.

This isn't a long term solution and I'd encourage the Google folks to follow through on a more comprehensive fix.

from go-samples.

porridge avatar porridge commented on June 19, 2024 2

This problem is also present in the calendar example, and I suspect many other too.

The reason is that the getTokenFromWeb function seems to implicilty rely on the out-of-band token transfer functionality which was removed for good in January 2023, as mentioned in #83. New clients seem to default to a http://localhost redirect URL, for which to work seamlessly the program would have to actively be listening on a port.

I happened to stumble upon exactly such listening implementation of this function in another repo. It's almost a drop-in replacement. One just needs to add a few imports, change the function name and pass the context, and it works!

from go-samples.

symbiont-ji avatar symbiont-ji commented on June 19, 2024

I am seeing the same problem.

from go-samples.

wogri avatar wogri commented on June 19, 2024

same here

from go-samples.

razeenf avatar razeenf commented on June 19, 2024

This same issue happens with the Google Drive quickstart.go

from go-samples.

Frosin avatar Frosin commented on June 19, 2024

I have the same problem

from go-samples.

biggianteye avatar biggianteye commented on June 19, 2024

This same issue happens with the Google Drive quickstart.go

Same problem with the Google Sheets example. Seems like a general problem, which is disappointing given this is intended to be learning material.

from go-samples.

terrytaochen avatar terrytaochen commented on June 19, 2024

Did anyone have a better example?

from go-samples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.