googleworkspace / md2googleslides

Generate Google Slides from markdown
Apache License 2.0
4.47k stars 283 forks source link

this app tried to access sensitive info in your google account. to keep your account safe, google blocked this access #199

Open theluke opened 1 year ago

theluke commented 1 year ago

Hello, I cannot authenticate in Google.

Even when I bypass the OOB issue, I am presented with this error:

This app tried to access sensitive info in your google account. To keep your account safe, google blocked this access.

I would need to ask my company admin to allow the insecure app, which will not happen.

Can you please switch to the same method used by rclone to authenticate the app?

ejc3 commented 1 year ago

https://stackoverflow.com/a/72117571/13299383 has a solution.

You'll also have to make this change:

diff --git a/src/auth.ts b/src/auth.ts
index 0e4fa0e..57f01d7 100644
--- a/src/auth.ts
+++ b/src/auth.ts
@@ -52,7 +52,7 @@ export interface AuthOptions {
  *   @returns {Promise.<String>} Promise yielding the authorization code
  */
 export default class UserAuthorizer {
-  private redirectUrl = 'urn:ietf:wg:oauth:2.0:oob';
+  private redirectUrl = 'http://localhost';
   private db: lowdb.LowdbSync<Credentials>;
   private clientId: string;
   private clientSecret: string;