{"record":{"id":"d3b544a612b7902c","repo":"ruvnet/ruflo","slug":"no-refresh-token-available","errorCode":null,"errorMessage":"No refresh token available","messagePattern":"No refresh token available","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/mcp/src/oauth.ts","lineNumber":218,"sourceCode":"    }\n\n    const data = (await response.json()) as TokenResponse;\n    const tokens = this.parseTokenResponse(data);\n\n    await this.tokenStorage.save('default', tokens);\n    this.logger.info('Token exchange successful');\n    this.emit('tokens:received', { expiresIn: tokens.expiresIn });\n\n    return tokens;\n  }\n\n  /**\n   * Refresh access token using refresh token\n   */\n  async refreshTokens(storageKey: string = 'default'): Promise<OAuthTokens> {\n    const existing = await this.tokenStorage.load(storageKey);\n    if (!existing?.refreshToken) {\n      throw new Error('No refresh token available');\n    }\n\n    const params = new URLSearchParams({\n      grant_type: 'refresh_token',\n      refresh_token: existing.refreshToken,\n      client_id: this.config.clientId,\n    });\n\n    if (this.config.clientSecret) {\n      params.set('client_secret', this.config.clientSecret);\n    }\n\n    const response = await fetch(this.config.tokenEndpoint, {\n      method: 'POST',\n      headers: {\n        'Content-Type': 'application/x-www-form-urlencoded',\n      },\n      body: params.toString(),","sourceCodeStart":200,"sourceCodeEnd":236,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/mcp/src/oauth.ts#L200-L236","documentation":"refreshTokens() loaded the stored OAuth tokens for the storage key but the record has no refreshToken field, so there is nothing to exchange for a new access token. Typically the initial grant was access-token-only or the refresh token was already consumed/cleared.","triggerScenarios":"Thrown at v3/@claude-flow/mcp/src/oauth.ts:218 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run the OAuth login flow again with offline access / refresh token scope so a refresh token is issued.","Store the refresh token returned by the initial authorization and reload it before refreshing."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}