azai91/alfred-drive-workflow

"Google login has been deactivated for this app"

micaelgrenholm opened this issue · 30 comments

Hi! I long to use your workflow but it isn't working. As I run it with writing for example "d micael", I'm asked to log in. I then come to this page:

Skärmavbild 2020-01-07 kl  13 44 42

And as I click on my account, I get this:

Skärmavbild 2020-01-07 kl  13 12 52

It says (in Swedish) "Logging in with Google has temporarily been deactivated for this app. Google has not verified this app to Login with Google yet."

How do I solve this?

(BTW I tried to get the log file but it didn't work).

I am facing the same issue

I'm also stuck at this

This workflow would helpout so much! Please fix google auth.

met same issue also.

Me 10

Yes, I have been a happy user of this workflow for about 6 months, and am sad to see it break now.

same problem here. pretty please with a cherry on top.

Same

Same

Same

I couldn't get this to work either. Originally I opened up the project and was going to fork this project and set up my own OAuth account on google to set this up. But... ended up going for a much simpler workflow.

  • Installed the google drive app.

  • Added the google drive folder to Alfred search (typically /Volumes/GoogleDrive).

Then Alfred will treat that folder like any other. Easy to search and find the thing you need! Works fine!

How do I add the google drive folder to Alfred search?

Same

Same. Seems related to the script not being verified: https://support.google.com/cloud/answer/7454865?hl=en

@azai91 any chance you're planning to get this verified? :)

Same problem here!

Hey guys, I found a solution here. Requires some clicks, but it's totally doable.
1 - Go to Google APIs
2 - Create a New Project
3 - Go to "Library" and enable Google Drive API
4 - Create a OAuth consent screen: The only 2 things I need is to create an Application name, and under scopes select all google drive related items.
5 - Create a credential: OAuth Client ID -> Next screen select other -> copy de "Client ID" and "Client Secret"
6 - Go to Alfred -> Workflows -> Right click on the Google Drive Workflow -> Show in Finder
7 - Edit the .rb file with your client id and client secret.
8 - Run the workflow and sign in

The steps might differ a bit.
Best

@pedrodaroza - I followed your instructions and seemed to get through all the steps alright until number 8. When I run the workflow again and attempt to sign in, I continue to get the same 'this app isn't verified' error screen.

After completing step 4 in your instructions, I landed on the main OAuth Consent Screen page and noticed that the app you had me create in step 2 needs to be submitted to Google for verification: https://ca.mag.cm/nOuNXw24 [screenshot]. It seems that I am stuck in the same situation as @azai91's original workflow.

How did you get around this issue? Did you have to wait for Google to approve your app?

@andrewmarkle - I wasn't able to get your trick to work until I realized that Alfred App doesn't look for the file types on Google Drive by default. It will only show the folders in your Google Drive by default.

I had to open Alfred App's Preferences and navigate to Features > Default Results > Advanced, and then drag the different Google Drive file types into the window: https://ca.mag.cm/eDuxXvDj [screenshot]

Once I added those file types, the documents and spreadsheets from my Google Drive started to show up. Just putting this explanation here incase others run into this same trouble.

@pedrodaroza - I followed your instructions and seemed to get through all the steps alright until number 8. When I run the workflow again and attempt to sign in, I continue to get the same 'this app isn't verified' error screen.

After completing step 4 in your instructions, I landed on the main OAuth Consent Screen page and noticed that the app you had me create in step 2 needs to be submitted to Google for verification: https://ca.mag.cm/nOuNXw24 [screenshot]. It seems that I am stuck in the same situation as @azai91's original workflow.

How did you get around this issue? Did you have to wait for Google to approve your app?

You really don’t need to submit anything to google. Once you get to the authorization page, it should have an option at the bottom left of the page to continue (or more options.... I’m not sure). If I’m not mistaken, you only need to send your app to google in order to not have this “App not safe” page, and to expand your access quota.

FYI @pedrodaroza 's crazy trick worked for me :)

@pedrodaroza 's trick also worked for me!

It worked for me too. When creating the consenting Oauth ID you should select the option "other" instead of "web application" or any other

That worked for me as well! Thanks @pedrodaroza.

Not sure if it's related, but it now doesn't seem to search shared drives in G Suite (which limits the use case for anyone in a G Suite org). Anyone see the same or have ideas on how to fix?

dozyx commented

Hey guys, I found a solution here. Requires some clicks, but it's totally doable.
1 - Go to Google APIs
2 - Create a New Project
3 - Go to "Library" and enable Google Drive API
4 - Create a OAuth consent screen: The only 2 things I need is to create an Application name, and under scopes select all google drive related items.
5 - Create a credential: OAuth Client ID -> Next screen select other -> copy de "Client ID" and "Client Secret"
6 - Go to Alfred -> Workflows -> Right click on the Google Drive Workflow -> Show in Finder
7 - Edit the .rb file with your client id and client secret.
8 - Run the workflow and sign in

The steps might differ a bit.
Best

Fill the REDIRECT_URL from .rd file into Credentials -> Authorized JavaScript origins make this work for me.

Okay, the issue I ran into here, is adding the scopes in the oath screen requires that you submit your project to google. I'm talking about the part below:

image

So... not sure how this will pan out, but it probably won't work for anyone without this step. I tried everything above with no success.

It works for me without the verfication by Google @jacobSingh You just have to click on "Advanced" and allow it anyway, when the Pre-Sign in shows up, where it says, that the app is not verified yet.
Then just choose your account in which you created the App at the console and it works

Hey guys, I found a solution here. Requires some clicks, but it's totally doable.
1 - Go to Google APIs
2 - Create a New Project
3 - Go to "Library" and enable Google Drive API
4 - Create a OAuth consent screen: The only 2 things I need is to create an Application name, and under scopes select all google drive related items.
5 - Create a credential: OAuth Client ID -> Next screen select other -> copy de "Client ID" and "Client Secret"
6 - Go to Alfred -> Workflows -> Right click on the Google Drive Workflow -> Show in Finder
7 - Edit the .rb file with your client id and client secret.
8 - Run the workflow and sign in

The steps might differ a bit.
Best

There is 1 extra step that must be done as of 11/14/2020. You must go to the projects credentials

image

Edit the OAuth ID:

image

And set this as a redirect URL:

http://127.0.0.1:1337

image

Also, when sent to the login page, click Advanced and Continue(unsafe). As you're making the API yourself, nothing is really unsafe about this at all, so don't worry, it's just a reminder not to allow random apps to access your Google Drive.

@pedrodaroza Thanks for the very clear step-by-step guide !

  • It works fine for my personal drive but...
  • it does not work for the shared drives of the organisation

--> Any cluse on how to activate the right for the rest of the organisation ? Thanks !

Hello! I've

Hey guys, I found a solution here. Requires some clicks, but it's totally doable.
1 - Go to Google APIs
2 - Create a New Project
3 - Go to "Library" and enable Google Drive API
4 - Create a OAuth consent screen: The only 2 things I need is to create an Application name, and under scopes select all google drive related items.
5 - Create a credential: OAuth Client ID -> Next screen select other -> copy de "Client ID" and "Client Secret"
6 - Go to Alfred -> Workflows -> Right click on the Google Drive Workflow -> Show in Finder
7 - Edit the .rb file with your client id and client secret.
8 - Run the workflow and sign in
The steps might differ a bit.
Best

There is 1 extra step that must be done as of 11/14/2020. You must go to the projects credentials

image

Edit the OAuth ID:

image

And set this as a redirect URL:

http://127.0.0.1:1337

image

Also, when sent to the login page, click Advanced and Continue(unsafe). As you're making the API yourself, nothing is really unsafe about this at all, so don't worry, it's just a reminder not to allow random apps to access your Google Drive.

I've tried following this, but when I click on my account to login this happnes:
Screen Shot 2021-05-06 at 20 14 23