Bad Authentication Error Rails connecting to google drive

前端 未结 3 1845
被撕碎了的回忆
被撕碎了的回忆 2021-01-19 04:20

I have a contacts controller which has a method to connect and save the data submitted from the form to a spreadsheet in my account on google drive (app/models/contact.rb):<

3条回答
  •  后悔当初
    2021-01-19 04:43

    You might have the same issue I had. I was accessing my google doc using the google_drive gem on a personal project I had not touched in over a year. I used to be able to access my google doc by enabling a session using session = GoogleDrive.login('rosalyntest1@gmail.com', 'password') but was now getting the same error as you.

    I logged into that account using my password and saw an email from google with a subject of "sign in blocked." I followed the link https://www.google.com/settings/security/lesssecureapps to enable less secure app access for that account only and was able to enable a session locally using the same code. I would check your google account and see if you received an email or enable less secure app access and try again.

提交回复
热议问题