Open bugok opened 2 years ago
Digging into this a little, I found this stack overflow discussion about this, which seems relevant, explaining that this error is because of a deprecated use of OAuth: https://stackoverflow.com/questions/71318804/google-oauth-2-0-failing-with-error-400-invalid-request-for-some-client-id-but
I think the redirect_url isn't right (it's currently set to urn:ietf:wg:oauth:2.0:oob
). Does that make sense? What would be a potential fix?
Looking at my ~/.md2googleslides/client_id.json
file, I see that the redirect_url
field is set to ["http://localhost"]
, but when I run ~/node_modules/md2gslides/bin/md2gslides.js -n
and change the redirect_uris
parameter to http://localhost
- I get passed the error - but nothing happens - because nothing is running on that host:port.
I think I should generate a credentials with a different redirect_uris - but I'm not sure how to do that.
@bugok any updates on your end?
@mlavina: No, I couldn't get this to work :( My hunch is that the authentication part of the code could use an update to newer standards - but that's a guess. I'm not sure about this assumption.
Digging into this a little, I found this stack overflow discussion about this, which seems relevant, explaining that this error is because of a deprecated use of OAuth: https://stackoverflow.com/questions/71318804/google-oauth-2-0-failing-with-error-400-invalid-request-for-some-client-id-but
The workaround shown in the answer works for md2googleslides too.
Because the problem is coming from urn:ietf:wg:oauth:2.0:oob
, you can search the string under node_modules/md2gslides
and replace it with http://localhost:1/
. In the current main
branch, it's here, so I had to modify node_modules/md2gslides/lib/auth.js
this time.
Then it will redirect you to http://localhost:1/?code=CODE&scope=...
, so you can paste the CODE
in the place where md2slides.js asks you to "Enter the code here".
@k0kubun: That workaround worked! Thanks!
(I still think I should keep the issue open, as the current source doesn't seem to work)
Same problem here, I applied the workaround, but I am getting a new error "This App tried to access sensitive content..." App is blocked! Even if you enable the "less secure apps", the error persists
Following the installation instructions in https://github.com/googleworkspace/md2googleslides/issues/95 I was able to get passed the OAuth issue by installing using
npm install googleworkspace/md2googleslides
, but I hit another issue right after invoking~/node_modules/md2gslides/bin/md2gslides.js
for the first time:(For searching purposes, I see this text in the bottom part of the error: 'redirect_uri: urn:ietf:wg:oauth:2.0:oob')
I followed the instructions in the README.md file. I've setup a new google cloud project for this, trying to follow the defaults - but maybe I got something wrong there?
Thanks.