Urgent.News

What's breaking now, across thousands of outlets.

Tech

My OAuth Tokens Kept Expiring Every 7 Days, and the Reason Was a Dropdown Labeled 'Testing'

Three weeks into running my publishing pipeline on autopilot, it just stopped. Not with a crash -- with the exact same error I'd already spent a week debugging and fixing once before: invalid_grant: Token has been expired or revoked . Same message, same script, same working setup. I assumed I'd broken my own fix. I hadn't. This was a completely different bug wearing the same disguise, and it had…

My OAuth tokens kept expiring every seven days, despite no changes to the setup or the app's usage. The issue persisted even after fixing a different bug and verifying that the token file remained untouched. The root cause was discovered in the OAuth consent screen: the "Testing" setting in Google Cloud's Google Auth Platform restricted refresh tokens to a maximum of seven days, regardless of usage.

To resolve the problem, the Publishing status was switched from "Testing" to "In production," which allowed refresh tokens to maintain a longer lifespan. Additionally, the script was updated to catch refresh failures explicitly, providing a clearer error message and preventing silent failures. This change ensured that future OAuth-related issues would be more easily identifiable and manageable.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Docker Says "Healthy" and the Pod Keeps Sending Broken Traffic

Run this on any Kubernetes cluster that has containers with HEALTHCHECK defined in their Dockerfile and no livenessProbe or readinessProbe configured in the manifest: kubectl get pods -o wide docker…

  • Docker's HEALTHCHECK runs inside Docker daemon, reports status to Docker inspect.
  • Kubernetes relies on its own health checks: livenessProbe, readinessProbe, startupProbe.
  • Pod may receive traffic despite Docker reporting it as healthy, causing potential issues.

More from Friday 28 August →