-
Notifications
You must be signed in to change notification settings - Fork 106
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
OAuth authentication fails with invalid credentials #168
Comments
Do you by chance have 2 factor authentication enabled on your Google account? If so, you might need to generate a "app" password, as detailed here. https://support.google.com/mail/answer/185833?hl=en I was having the problem you described, then recalled a similar issue authorising another app to use Google's SMTP server. I tried creating an app password and it has now worked. I did need to blow away my emacs directory and reinstall it to get it to finally work. I'm sure that's a pretty extreme solution and isn't necessary for people with more knowledge of emacs/spacemacs. I couldn't figure out how to reauth the app via oauth2 to retry with an app password. |
Hi Philippe Thank you in advance for any help. |
I have this same issue. It works, but it constantly asks for my credentials (even after checking remember this information) and I need to delete the |
It has now completely stopped working and I just cannot sync with google at all due to "Invalid Credentials". |
Same thing for me. I never got it working properly and now it's not working at all. Safe to say that this project is dead. |
Same issue here. |
Found the solution. You have to enable CalDAV API for your application in the Google Developer Conole |
Unfortunately I already have that enabled and it did not work. |
Unless the credential must be updated through the Developer Console...I should try that. |
I've just hit this myself, this does indeed resolve it and should be added to the README :) I know that google seems to be frowned upon but many of us require it for work and having good instructions for setting it up would be great! If it would be accepted, I'm happy to attempt a minor rewrite of the README |
Yes, update to the google documentation would be very much appreciated. If you also want to do more extensive rewrite of the docs, I suggest checking in this issue to avoid duplicating effort: By the way, is oauth2 really necessary for google, or is App Password sufficient? I don't use org-caldav with google, but I do use mbsync/msmtp with gmail, and I just use an App Password for that, I don't think I use oauth2 (but maybe I misremember). |
I think it depends if you want bi-directional sync or not. In my case I was also missing a bunch of meetings, ones that weren't company-wide I think |
Same issue, this suddenly started failed this week with no changes to the configuration or the account. Have tried deleting oauth2.plstore.
and
CalDAV API has been enabled from the start. I've had this happen a few times and it can only be fixed by using a new calendar, making me believe that somehow org-caldav is pushing a malformed event which then causes that calendar to permanently fail, no matter the credentials used to fetch. |
So, I think this thread contains a couple unrelated issues regarding google calendar setup. But regarding the 401 invalid token error specifically, I think it might have to do with problems refreshing an expired oauth2 token. From https://developers.google.com/calendar/api/guides/errors :
I think I ran into this problem when trying to re-enable my old google calendar config for testing. I got the 401 error, but worked around it by creating a new app/project/client ID in the Google console which then worked. |
This may be a beginner question, but I can't seem to get OAuth authentication against my main Google calendar to work. I used to use
org-gcal
from here which worked; but trying to use the same client ID and client secret withorg-caldav
I face the following issues:org-caldav
asks me for a username and password for https://accounts.google.com/o/oauth2/token and I don't know what to enter here; my Google password seems not to work (I have 2-factor authentication enabled) and a specially created app password doesn't work either. Isn't the whole point of OAuth to stop the exchange of usernames and passwords over HTTP?plstore-cache-passphrase-for-symmetric-encryption
is set tot
.GPG_AGENT_INFO
is unset, both in.emacs
and usingunset GPG_AGENT_INFO
in bash. Nevertheless, Emacs uses the external GPG agent.I'm using unmodified
org-caldav
from here,oauth2
from MELPA and emacs 25.2.1 on Linux Mint 19. Here's myorg-caldav
configuration:The configuration is based on this post, the client ID and client secret are working with
org-gcal
and should be fine.The compile log has the following warnings:
Here is the debug log:
The text was updated successfully, but these errors were encountered: