googleworkspace / md2googleslides

Generate Google Slides from markdown
Apache License 2.0
4.48k stars 284 forks source link

Authorisation Error #70

Closed py9mrg closed 4 years ago

py9mrg commented 4 years ago

Just tried to run md2gslides and got the following error:

Sign in with Google temporarily disabled for this app
This app has not been verified yet by Google in order to use Google Sign In.

Would have thought Google would allow its own devs access!

nullplus commented 4 years ago

Today, I get Authorisation Error too.

edisonbermudez commented 4 years ago

Same

emicklei commented 4 years ago

From https://support.google.com/accounts/thread/20757484?hl=en it appears that the app needs a different setup as documented here: https://developers.google.com/identity/protocols/oauth2/native-app

mrwine commented 4 years ago

Same error today

raph-amiard commented 4 years ago

Seriously it is a bit ridiculous that the sample app for the slides API does not have access to the slides API no ? Can a maintainer please look at this ? @sqrrrl ?

chrisjsewell commented 4 years ago

Is there a work-around for this, or is the package literally unusable at the moment?

sqrrrl commented 4 years ago

See #64 -- plan is to remove the built-in cloud project and let folks create/use their own.

The main issue is the app is using sensitive/restrictive scopes, and as it's an unofficial product it's subject to the same verification policies as any other 3P app. We don't get any special treatment for stuff like this. In order to keep this in a read-to-run state (vs. some setup required) I'd either have to drop the use of the full drive scope (which is used to copy existing presentations/template) or rewrite this to be a hosted web app where I can use the file picker in order to avoid using restricted scopes. Note that the scope restrictions didn't exist when this was first written.

Easiest short-term solution is to require setup -- create your own cloud project & oauth client. Happy to take a PR if somebody wants to make the changes for that. Otherwise don't have an ETA as to when it'll get done.

sqrrrl commented 4 years ago

Closing in favor of #64

raph-amiard commented 4 years ago

Ok thanks for the update @sqrrrl !

I guess in the meantime removing the app as the main google slides API sample on this page would be a good thing.

Also would you have any advice as to how to "hack" this back to work ? I would be ready to take a stab at #64 from there if it doesn't look too daunting.

py9mrg commented 4 years ago

As I noted on #64 - this won't help those of us who, like me, work for an organisation who do not allow you to make your own GCP to link to your drive! What is the solution for us? Sorry to be pushy but this is a fantastic tool that would massively save me time, but I don't have the knowledge of Google's authentication system to begin to even know where to start. If I compare this to, say, the googlesheets4 R package, or the MilesMcBain/markdrive app that can do md -> docs, those seem to work fine despite being unofficial apps too - is there some way to mimic the way they authenticate?

wescpy commented 4 years ago

@py9mrg : if your company doesn't allow you to create Google Cloud projects from your work account, the best thing to do is to do it from your Google/Gmail consumer account, then share the generated presentation with your work G Suite account.

@raph-amiard : Best way to get it to work ASAP is edit your bin/md2gslides.js file... replace clientId and clientSecret variables on lines 128-129 with the equivalent from the credentials file you created in the devconsole.

If you've never done this before, you need to create a developer project, so start here then follow step 7 (Authorize API requests) from this intro to G Suite APIs codelab (or do the complete codelab to learn how to use those APIs starting with Drive, then enable the Slides API once you're done).

After you've downloaded your OAuth client ID file, open it up to find your client_id and client_secret, and save those values into clientId and clientSecret variables respectively, noting the change in the format/names. This is why issue #64 is called "bring your own credentials."

If you'd rather see this visually, in step 9 (Additional resources) of the codelab is a video you can watch ("Creating new Google API projects") which shows you how to do this. We've made a bunch of improvements to the UI since the video was made, so while it won't exactly the same as today's console, the functionality you'll perform will be nearly the same. Note the codelab has images of the updated UI.

If you're an advanced developer or one that's already familiar with using (non-Cloud) Google APIs client libraries, then you can follow the guidance in step 11 (advanced devconsole usage) using the Slides API.

wescpy commented 4 years ago

BTW, I submitted a PR </pull/74> yesterday, so if you need it working urgently and can't wait for the review process to complete, grab the patch for your own install. You still need to follow the steps above to download your credentials file to get it to function fully (again). Instead of you cutting-n-pasting your own client ID and secret, the patch simply has you installing your credentials file into the ~/.md2googleslides folder and makes the app read those values from it during execution.

py9mrg commented 4 years ago

@wescpy

You’re a hero - thank you.

wescpy commented 4 years ago

LOL, not a hero, but someone who, like you, relies on this tool for my day job (not entirely, but enough that I need this thing working again). :-) ps. Many moons ago, I built a tool like this for Python & PowerPoint, so I was quite excited when my colleague created this superior equivalent for Slides.