pimutils / pimutils/vdirsyncer

Can't connect to google

Open
#852 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.9k
Forks
185
Avg merge
11h 49m
Merged PRs (30d)
1

Description

Hello,

I am using the version 0.16.8 of vdirsyncer that I installed with pipsi on ubuntu 20.04 server. I followed this guide http://vdirsyncer.pimutils.org/en/stable/config.html to connect to google.

First I had a problem with requests-oauthlib missing so I installed it with

/root/.local/venvs/vdirsyncer/bin/python -m pip install requests-oauthlib

But I now receive the following error when I try to discover:

Opening https://accounts.google.com/o/oauth2/v2/auth?response_type=code&client_id=<my_client_id>&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcarddav&state=<some_code>&access_type=offline&approval_prompt=force ...
warning: No graphical browser found. Please open the URL manually.
Follow the instructions on the page.
Paste obtained code:

Unfortunately, I can't get the code to paste because I receive the following error from google if I open the link in my browser:

The redirect URI in the request, urn:ietf:wg:oauth:2.0:oob, can only be used by a Client ID for native application. It is not allowed for the WEB client type. You can create a Client ID for native application at https://console.developers.google.com/apis/credentials/oauthclient

I am sure my client_id and client_secret are correct (as shown in https://console.developers.google.com/apis/credentials)

Do you have any idea how I could fix this?

Thanks for any help

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Google discovery flow with vdirsyncer 0.16.8 on Ubuntu and review the OAuth configuration described in the linked guide. Compare the requested redirect URI with the Google client type; done means authorization completes and discovery proceeds without the redirect-URI error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authentication, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.