Skip to content
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 token expiry #18

Open
carwin opened this issue Jan 19, 2022 · 2 comments
Open

OAuth token expiry #18

carwin opened this issue Jan 19, 2022 · 2 comments

Comments

@carwin
Copy link

carwin commented Jan 19, 2022

Hi again @JulienMasson - I'm running into a new issue where my OAuth token has expired, but the refresh token process seems unable to complete.

Upon running org-gtasks and going through the menu options to select an account and task list, my **Messages** buffer is flooded with the following:

[error] request--callback: peculiar error: 401
[error] request-default-error-callback: https://www.googleapis.com/oauth2/v3/token error
OAuth token expired. refresh access token

This continues for some time until finally returning deferred:resignal: Variable binding depth exceeds max-specpdl-size, though I'm not sure if this last bit is related.

What's the process for wiping out any existing tokens and starting over fresh?

@JulienMasson
Copy link
Owner

JulienMasson commented Jan 21, 2022

Hi @carwin,

What's the process for wiping out any existing tokens and starting
over fresh?

hummm (org-gtasks-check-token account) is responsible to check the token.

And this error:

[error] request--callback: peculiar error: 401
[error] request-default-error-callback: https://www.googleapis.com/oauth2/v3/token error
OAuth token expired. refresh access token

should be catch in org-gtasks-parse-errors.

Do you a way to reproduce "easily" the issue ?

@carwin
Copy link
Author

carwin commented Jan 24, 2022

Unfortunately I don't. The issue seems rather intermittent, over the last 5 days I've encountered it only twice.

The only way I've successfully gotten around it has been to completely wipe out the user Emacs directory, which isn't ideal.

Another package, org-gcal, seems to have a function that might be worth copying to deal with this and other outdated/corrupt token issues: org-gcal-sync-tokens-clear, which clears all the API sync tokens. Something like that could help deal with this scenario when it does occur!

(defun org-gcal-sync-tokens-clear ()
  "Clear all Calendar API sync tokens.

  Use this to force retrieving all events in ‘org-gcal-sync’ or
  ‘org-gcal-fetch’."
  (interactive)
  (setq org-gcal--sync-tokens nil)
  (persist-save 'org-gcal--sync-tokens))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants