openclaw - 💡(How to fix) Fix [Bug]: ClawHub login refresh loop after account deletion + GitHub username rename [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#52163Fetched 2026-04-08 01:14:55
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2

Deleted my ClawHub account because it showed my old GitHub username after a rename. Now sign-in just refreshes the page endlessly.

Already tried: revoked OAuth, cleared cookies, incognito window, re-authorized — still loops.

Current GitHub: 0xMagistery Old GitHub: MagisteryOrg Profile: https://github.com/0xMagistery Deleted account: Approx time account was deleted (UTC): 2026-03-22 ~07:00-08:00 UTC

Please clear the stale account record so I can sign in fresh. Thanks!

Error Message

Clicking "Sign in with GitHub" redirects back to ClawHub but the page refreshes and I remain logged out. No error message is displayed. The login loop repeats on every attempt, including in incognito with cleared cookies and re-authorized OAuth.

Root Cause

Deleted my ClawHub account because it showed my old GitHub username after a rename. Now sign-in just refreshes the page endlessly.

RAW_BUFFERClick to expand / collapse

Bug type

Crash (process/app exits or hangs)

Summary

Deleted my ClawHub account because it showed my old GitHub username after a rename. Now sign-in just refreshes the page endlessly.

Already tried: revoked OAuth, cleared cookies, incognito window, re-authorized — still loops.

Current GitHub: 0xMagistery Old GitHub: MagisteryOrg Profile: https://github.com/0xMagistery Deleted account: Approx time account was deleted (UTC): 2026-03-22 ~07:00-08:00 UTC

Please clear the stale account record so I can sign in fresh. Thanks!

Steps to reproduce

  1. Rename GitHub username
  2. Notice ClawHub still shows old username
  3. Delete ClawHub account
  4. Revoke ClawHub OAuth app in GitHub settings
  5. Re-authorize OAuth
  6. Click "Sign in with GitHub" on ClawHub
  7. Page refreshes, never logs in — stuck in loop

Expected behavior

Clicking "Sign in with GitHub" should complete the OAuth flow and create a new ClawHub account linked to my current GitHub username, as it did when I originally signed up before the deletion.

Actual behavior

Clicking "Sign in with GitHub" redirects back to ClawHub but the page refreshes and I remain logged out. No error message is displayed. The login loop repeats on every attempt, including in incognito with cleared cookies and re-authorized OAuth.

OpenClaw version

N/A — this is a ClawHub web (clawhub.ai) authentication issue, not an OpenClaw CLI bug.

Operating system

macOS 15 (Sequoia) — but this is a server-side auth issue, not OS-dependent.

Install method

No response

Model

N/A — not model-related. This is a ClawHub account/OAuth issue.

Provider / routing chain

N/A — browser → clawhub.ai OAuth → GitHub. No model/provider involved.

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

Fix Plan

To resolve the issue, we need to clear the stale account record and update the OAuth flow. Here are the steps:

  • Clear stale account record:
    • Query the database for the deleted account record using the old GitHub username (MagisteryOrg).
    • Update the record to reflect the new GitHub username (0xMagistery) or delete the record if it's no longer needed.
  • Update OAuth flow:
    • Verify that the OAuth callback URL is correctly configured to handle the new GitHub username.
    • Ensure that the OAuth flow is properly handling the case where a user has renamed their GitHub username.

Example code snippet ( Node.js and Express.js ):

// Clear stale account record
const updateAccountRecord = async (oldUsername, newUsername) => {
  const accountRecord = await db.query(`SELECT * FROM accounts WHERE github_username = $1`, [oldUsername]);
  if (accountRecord) {
    await db.query(`UPDATE accounts SET github_username = $1 WHERE id = $2`, [newUsername, accountRecord.id]);
  }
};

// Update OAuth flow
const oauthCallback = async (req, res) => {
  const githubUsername = req.user.github_username;
  const accountRecord = await db.query(`SELECT * FROM accounts WHERE github_username = $1`, [githubUsername]);
  if (!accountRecord) {
    // Create a new account record
    await db.query(`INSERT INTO accounts (github_username) VALUES ($1)`, [githubUsername]);
  }
  // Complete the OAuth flow
  res.redirect('/login-success');
};

Verification

To verify that the fix worked, try the following:

  • Sign in with GitHub using the new username (0xMagistery).
  • Verify that the account record is updated correctly in the database.
  • Ensure that the OAuth flow completes successfully and the user is logged in.

Extra Tips

  • Regularly clean up stale account records to prevent similar issues in the future.
  • Consider implementing a mechanism to automatically update account records when a user renames their GitHub username.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Clicking "Sign in with GitHub" should complete the OAuth flow and create a new ClawHub account linked to my current GitHub username, as it did when I originally signed up before the deletion.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: ClawHub login refresh loop after account deletion + GitHub username rename [1 participants]