Skip to main content
Glama

clear_github_auth

Remove GitHub authentication to disconnect your account or switch profiles. This action clears active GitHub connections, enabling seamless transitions between accounts or integrations.

Instructions

Remove GitHub authentication and disconnect from GitHub. Use when users say 'disconnect from GitHub', 'remove my GitHub connection', 'clear authentication', or want to switch accounts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool registration including name, description, input schema (empty object), and handler function that delegates to server.clearGitHubAuth()
    { tool: { name: "clear_github_auth", description: "Remove GitHub authentication and disconnect from GitHub. Use when users say 'disconnect from GitHub', 'remove my GitHub connection', 'clear authentication', or want to switch accounts.", inputSchema: { type: "object", properties: {} } }, handler: () => server.clearGitHubAuth() },
  • TypeScript interface declaration for the clearGitHubAuth method on IToolHandler
    clearGitHubAuth(): Promise<any>;
  • Core logic for clearing GitHub authentication: removes stored token, clears API cache, logs security event. Likely invoked by server.clearGitHubAuth() implementation.
    async clearAuthentication(): Promise<void> { try { // Get the token before clearing it const token = await TokenManager.getGitHubTokenAsync(); if (token) { // Attempt to revoke the token on GitHub // Note: GitHub OAuth tokens don't have a revocation endpoint for device flow tokens // But we'll clear the cache and remove from storage // Clear cached user info this.apiCache.clear(); // Log security event for audit trail SecurityMonitor.logSecurityEvent({ type: 'TOKEN_CACHE_CLEARED', severity: 'LOW', source: 'GitHubAuthManager.clearAuthentication', details: 'GitHub authentication cleared by user request', metadata: { hadToken: true, tokenPrefix: TokenManager.getTokenPrefix(token) } }); } // Remove from secure storage await TokenManager.removeStoredToken(); logger.info('GitHub authentication cleared successfully'); } catch (error) { ErrorHandler.logError('GitHubAuthManager.clearAuthentication', error); throw ErrorHandler.createError('Failed to clear authentication', ErrorCategory.AUTH_ERROR, undefined, error); } }
  • Registers all auth tools (including clear_github_auth) from AuthTools into the central ToolRegistry during server setup
    // Register auth tools this.toolRegistry.registerMany(getAuthTools(instance));

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DollhouseMCP/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server