Giter Site home page Giter Site logo

Oauth blocked access about md2googleslides HOT 9 OPEN

shaktee avatar shaktee commented on June 2, 2024 21
Oauth blocked access

from md2googleslides.

Comments (9)

jonathan-chin avatar jonathan-chin commented on June 2, 2024 6

I was finally able to get this working. I know that there's an unmerged PR that might have fixed this but it seems stuck in limbo. here's how I fixed it (it gets dirty):

  1. follow the installation and usage, specifically to get OAuth client credentials.
  2. request the following permission scopes: https://www.googleapis.com/auth/presentations, https://www.googleapis.com/auth/drive (might require more. I added a bunch but I think these 2 are the only ones needed)
  3. edit the source code: bin/md2gslides.js lines 129 and 130:
    const options = {                                                                                                                                                                                      
        clientId: 'YOUR CLIENT ID',                                                                                                              
        clientSecret: 'YOUR CLIENT SECRET',                                                                                                                                                          
        filePath: STORED_CREDENTIALS_PATH,                                                                                                                                                                 
        prompt: prompt,                                                                                                                                                                                    
    };

let me know if that works for you. I'm happy to help, since I rely on this pretty heavily and can imagine others might too.

from md2googleslides.

wescpy avatar wescpy commented on June 2, 2024 3

Ok, I ran into this last night, dug around, and found out a few things:

  1. @jonathan-chin 's fix is legit. In fact, I told users the same thing last year, so it's an "old" fix.
  2. I also fixed this bug and the original one with this patch in Apr 2020 which was finally merged Jun 2021.
  3. However because the latest release tag is still v0.5, you're not installing the fix.
  4. IOW, @zseta the reason why it's hardcoded requiring the fix-by-hand, is because you've installed the version from Apr 2019, not from Jun 2021 or newer.
  5. Bottom-line: you either go w/the patch by hand, or you clone the repo, compile with npm run compile, then replace what's in your /usr/local/bin (or wherever you've got it installed) with the latest one which s/b in your bin after compilation.
  6. This bug will likely be closed as a dupe of the original one.
  7. I pinged the maintainer last night and asked them to rev the version, so hopefully this will be a non-issue soon, but if not, at least you know what to do now. :-)

from md2googleslides.

zseta avatar zseta commented on June 2, 2024 1

thanks @jonathan-chin it works for me. I wonder why clientSecret and clientId are hardcoded..

from md2googleslides.

rumiiinator avatar rumiiinator commented on June 2, 2024

Hi just want to have a quick follow up on this thread.
I tried the similar approach mentioned above, which let me enter this stage
image

After checking both permission, the page will be redirected to a page to copy the authorized code.
But every time I paste the code to the terminal, I will get the following errors:
Unable to generate slides: Error: EAGAIN: resource temporarily unavailable, read ... at generateSlides (....) { errno: -35, syscall: 'read', code: 'EAGAIN' }
Wonder anyone has any idea about how to overcome/walk around this ....?

from md2googleslides.

GuiMarthe avatar GuiMarthe commented on June 2, 2024

No updates on this? Seems fixable, no?

from md2googleslides.

wescpy avatar wescpy commented on June 2, 2024

Yes, it's fixable, but the maintainer is pretty busy these days, and there are 2 workarounds: a) the repo has working code or b) patch the release you installed w/npm. So just follow the instructions above until they get a chance to "cut" a new release (tag).

from md2googleslides.

alexpdp7 avatar alexpdp7 commented on June 2, 2024

Also you can npm-install googleworkspace/md2googleslides instead of md2gslides. That will pull the latest from GitHub, and it seems to work correctly. Given that the instructions in the README are now invalid, I'd edit them to change the installation method until a release can be made.

from md2googleslides.

wangtiejun001 avatar wangtiejun001 commented on June 2, 2024

2. googleapis

I still met the "This app is blocked" issue just as the snapshot that shaktee posted.

Is there anyone who can help to identify the possible mis-configurations from my below steps?
Thanks...

What I tried:

  1. OAuth client credential is generated.
  2. Permission scope is added(I opened all permission scopes for testing the OAth issue).
  3. bin/md2gslides.js is modifed.
  4. client_id.json file is copied to .md2googleslides folder.

More about my config:

  1. inorder to get the credential, I configured the consent screen which requires a https service:
    oauth_consent_screen_config
  2. For creating the OAuth Client ID, I used the "desktop app/web application" rather than "Computer Application" as mentioned in the README.md. Because I cannot find the item.
    OAuth_client_service_type

More about my env:

  1. A personal gcp account.
  2. I ran the code from my local pc, while blocked at the "This app is blocked" page.
  3. I then ran the code from the server which I run for the https service(to ensure the origin is the same as the domain i used for the consent screen), still not work.

from md2googleslides.

wescpy avatar wescpy commented on June 2, 2024

Please read the comments above. The code works; there's no issue with your permissions. It's just that you're using the code from 2019. The maintainer is too tied up to cut another release, so use one of the alternative methods described in other comments for now.

from md2googleslides.

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.