-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doesn't comply with Google's OAuth 2.0 policy for keeping apps secure #975
Comments
I'm having the same problem. I tried setting up creds several times, but not working, unfortunately. |
This is yet-another scenario of Google deprecating without offering an alternative. They often deprecate APIs and forgets to offer any working replacement. There's nothing we can do here. Google discourages usage of this flow, but does not offer any alternative. For reference, here's what the linked page states:
So as of 28th of February, it won't be possible for new users to use vdirsyncer. As of 3rd of October, existing setups will stop working. I'll leave this issue open in case anything changes. |
Maybe using the Web Server OAuth API would work, although it assumes that vdirsyncer is running in a context where it can expose a web-server to the person running it (which it not true when you're SSH'ing into another machine or alike). |
@WhyNotHugo Thanks for looking into it. Google blows, no two ways about that. Really need to switch to something better... |
The service account flow also seems to be feasible - create a service account and share each calendar with the service account's email address. (https://stackoverflow.com/a/26067547/3403345 - edit: while that answer is ancient, the service flow still works the same, IIRC) Other libraries seem to be switching to the above-mentioned WebServer OAuth API - without too many changes to the relevant code And for the remote-server workflow, some applications seem to recommend simply copying a token file from a local installation. |
@WhyNotHugo took me a while to read through google's doc and understand whats needed. |
The problem is that this assumes that vdirsyncer can expose a port to the same machine where the user is running their browser for authentication. This is the case when running locally on your machine, but not when running on some remote device.
One bit caveat:
I think a helper to fetch a token locally is probably best. I'll try making a tiny easy-to-move-around binary that can be used for that. |
I run the script on a NAS (=no local browser) and use my browser on a different machine. Redirection works great. |
On 2022-05-04 Google sent an email with subject "[Action Required] Migrate your OAuth out-of-band flow to an alternative method before Oct. 3, 2022" - including the subject here to help people find this issue. Is anyone working on a PR? |
Any chance this warrants a point release? Looks rather important use-wise. |
Yeah, I've been preparing for a point release. Some changes around the tls settings need to be finalised in master first, but it'll be soon. |
I guess this hasn't made it into a release yet? |
Actually, there seems to be a more elegant solution that does not require opening extra ports. It is possible to keep the old authentication flow, but use the new "web app" credentials with a random localhost After the user gets authenticated by Google and allows the app to use the appropriate scopes, the user's browser gets redirected to |
It seems they're deprecating the existing API without a suitable replacement.
Not sure what we _can_ do.
|
As I pointed out, the API they still have left allows for a hack that requires minimal changes from out side. Basically, here is the solution (assuming the starting point is the behaviour in 0.18.0):
Yes, I know, I should learn Python and make a pull request... |
FWIW, I can confirm that I made vdirsyncer version 0.18.0 (Debian package version 0.18.0-6.1) work with my google calendars today.
This required no local server, no changes to my server's firewall, virtually no jumping through hoops, nothing. I suggest the one-line change be incorporated, and the steps to authenticate documented. |
Thanks @nekr0z your solution worked for me too |
Thanks @nekr0z the workaround works like a charm. |
How do I
? I.e. number 7 in the instructions form nekr0z |
@hajonnes If it's any help, I run |
@nekr0z Got the Google part working but i am stuck at the part where you paste the code back to the ssh session (Point 14). Where do you paste it? Pasting it in bash results in no such directory.. |
You must be using a version of vdirsyncer that is different from what's on my machine. The flow I described works for the exact version. In your case, other changes may be needed in |
@nekr0z Yes it looks like our versions differ... I got the request to google working, by matching the uri to just |
For me, adding |
I can confirm that adding |
It seems that in my case I had to open the link in a private browsing web browser window without any plugins running because after opening the Google web page and logging in, I always got a "something went wrong" error on the next Google web page. Just in case someone else is having that problem. |
Yeah, pasting it in didn't work for me. :( |
Yea, same here. I have the code now but I don't have any way to paste it anywhere. I am using the docker version as well. I pasted it in the same ssh I had running, but it doesn't do anything. |
I followed the instructions at https://vdirsyncer.pimutils.org/en/stable/config.html#google to configure synchronization between my Google Contacts and my local filesystem.
I found the following information indicating that the flow vdirsync is using is deprecated.
I have not been able to reproduce the success noted in the similar issue #970 (comment) .
The text was updated successfully, but these errors were encountered: