Skip to content

Deep copy auth.users to prevent infinite loop#2020

Merged
lissy93 merged 1 commit into
masterfrom
fix/external-auth-mem-spike
Mar 29, 2026
Merged

Deep copy auth.users to prevent infinite loop#2020
lissy93 merged 1 commit into
masterfrom
fix/external-auth-mem-spike

Conversation

@lissy93
Copy link
Copy Markdown
Owner

@lissy93 lissy93 commented Mar 29, 2026

Category: Bugfix

Overview
OIDC auth was causing an infinite Vue render loop that spiked CPU/RAM until the browser crashed.

Because getUsers() in Auth.js grabbed a direct reference to the auth.users array in the Vuex store, then .push()'d the OIDC user onto it. But since Vue 2 intercepts array mutations like push for reactivity, every call to getUsers() during a render was re-triggering another render, which called getUsers() again and again.

Fixed by just doing a deep copy, so the push only hits a local copy, and store is never mutated.

Issue Number #1995

New Vars N/A

Screenshot N/A

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 29, 2026

Deploy Preview for dashy-dev ready!

Name Link
🔨 Latest commit 9c87642
🔍 Latest deploy log https://app.netlify.com/projects/dashy-dev/deploys/69c966c0a44afe0008bfcaf1
😎 Deploy Preview https://deploy-preview-2020--dashy-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@lissy93 lissy93 merged commit 0361575 into master Mar 29, 2026
9 checks passed
@lissy93 lissy93 deleted the fix/external-auth-mem-spike branch March 29, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant