Skip to content

auth: daily invalid_grant invalid_rapt forces re-auth for Workspace account #338

@TheRealJamesRussell

Description

@TheRealJamesRussell

Summary

I’m seeing daily forced re-auth with a Google Workspace account when using gog (Tasks and other services).
The stored token exists, but API calls fail with:

oauth2: "invalid_grant" "reauth related error (invalid_rapt)"

This happens roughly every day, not every 7 days.

Environment

  • gog version: v0.11.0
  • OS: Linux (WSL2)
  • Account type: Google Workspace (@profittale.com)
  • Keyring backend: file
  • Services used: tasks,gmail,calendar,drive,contacts,docs,sheets

What I expected

Long-lived refresh token behavior (or at least not daily forced re-auth).

What happens

After successful auth, commands later fail with:

Get "https://tasks.googleapis.com/tasks/v1/users/@me/lists?...":
round trip: oauth2: "invalid_grant" "reauth related error (invalid_rapt)"
"https://support.google.com/a/answer/9368756"

Then I must re-auth again.

Repro steps

  1. Run:
    gog auth add <workspace-email> --services tasks,gmail,calendar,drive,contacts,docs,sheets
  2. Verify auth/token is present:
    gog auth list
  3. Run:
    gog tasks lists --json --results-only
  4. Works initially, then later fails with invalid_rapt and requires re-auth again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions