Skip to content

fix(auth): drop the stored token before redirecting to login - #264

Open
davidsu wants to merge 3 commits into
mainfrom
fix/clear-token-before-login-redirect
Open

fix(auth): drop the stored token before redirecting to login#264
davidsu wants to merge 3 commits into
mainfrom
fix/clear-token-before-login-redirect

Conversation

@davidsu

@davidsu davidsu commented Aug 27, 2026

Copy link
Copy Markdown

redirectToLogin() navigated to /login while leaving the rejected token in localStorage. Apps that serve their own login page then boot again with the same dead token, get another 401, and redirect to /login forever — the loop that hit ~3k custom-auth apps when the legacy app-user signing key was cut off (https://base44workspace.slack.com/archives/C095K108GKU/p1787509962872049).

The storage clear that logout() already does is extracted into a helper and redirectToLogin() calls it before navigating. Apps pick this up on their next build/publish; the installed population is covered server-side by base44-dev/apper#21743.

@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/sdk@0.8.44-pr.264.1c7c943

Prefer not to change any import paths? Install using npm alias so your code still imports @base44/sdk:

npm i "@base44/sdk@npm:@base44-preview/sdk@0.8.44-pr.264.1c7c943"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "@base44/sdk": "npm:@base44-preview/sdk@0.8.44-pr.264.1c7c943"
  }
}

Preview published to npm registry — try new features instantly!

@github-actions github-actions Bot added the docs-draft PR has auto-drafted documentation suggestions label Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-draft PR has auto-drafted documentation suggestions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant