gatsbyjs/gatsby · error
Your token has expired, you may need to login again
Error message
Your token has expired, you may need to login again
What it means
Warning from the CLI token manager: the stored Grafmeer/Telemetry login token's expiration timestamp is in the past. getToken still returns the (stale) token after warning; API calls requiring auth will fail until the user re-authenticates.
Source
Thrown at packages/gatsby-cli/src/util/manage-token.ts:12
import { getConfigStore } from "gatsby-core-utils"
import report from "../reporter"
const tokenKey = `cli.token`
const tokenExpirationKey = `cli.tokenExpiration`
const getExpiration = (): string => getConfigStore().get(tokenExpirationKey)
export const getToken = async (): Promise<string> => {
const expiration = await getExpiration()
const tokenHasExpired = new Date() > new Date(expiration)
if (tokenHasExpired) {
report.warn(`Your token has expired, you may need to login again`)
}
return getConfigStore().get(tokenKey)
}
export const setToken = (token: string | null, expiration: string): void => {
const store = getConfigStore()
store.set(tokenKey, token)
// we would be able to decode an expiration off the JWT, but the auth service isn't set up to attach it to the token
store.set(tokenExpirationKey, expiration)
}
View on GitHub (pinned to e85d62f177)
Solutions
- Log in again with `gatsby login` to refresh the token
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/gatsby-cli/src/util/manage-token.ts:12 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of gatsbyjs/gatsby@e85d62f177 (2026-08-26).
Data as JSON: /api/errors/47fa64e23d5baaa4.
Report an issue: GitHub.