Skip to content

Changes from background agent bc-fa95362b-9b8d-4180-acde-6fbfcaaefc1a - #48

Draft
Mtaasisi wants to merge 1 commit into
mainfrom
cursor/bc-fa95362b-9b8d-4180-acde-6fbfcaaefc1a-2ea9
Draft

Changes from background agent bc-fa95362b-9b8d-4180-acde-6fbfcaaefc1a#48
Mtaasisi wants to merge 1 commit into
mainfrom
cursor/bc-fa95362b-9b8d-4180-acde-6fbfcaaefc1a-2ea9

Conversation

@Mtaasisi

@Mtaasisi Mtaasisi commented Oct 4, 2025

Copy link
Copy Markdown
Owner

Centralize Supabase auth state management and optimize client configuration to prevent excessive INITIAL_SESSION logs and auto-refresh attempts before user login.

Multiple auth state change listeners across different contexts (PaymentsContext, AuthContext) were being initialized, along with Supabase's default autoRefreshToken and detectSessionInUrl settings. This led to redundant session checks and console spam when no user session existed. This PR introduces a centralized auth state handler and disables unnecessary client features to streamline the authentication flow and reduce console noise.


Open in Cursor Open in Web

This change consolidates authentication state change listeners into a single, reusable function. It also disables unnecessary Supabase auth configurations like `detectSessionInUrl` and `debug` to reduce console noise and improve performance. The `onAuthStateChange` function now only logs significant authentication events, further decluttering the console.

Co-authored-by: xamuelhance10 <xamuelhance10@gmail.com>
@cursor

cursor Bot commented Oct 4, 2025

Copy link
Copy Markdown

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@vercel

vercel Bot commented Oct 4, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
pos Error Error Oct 4, 2025 5:55am
pos-c12n Error Error Oct 4, 2025 5:55am

@netlify

netlify Bot commented Oct 4, 2025

Copy link
Copy Markdown

Deploy Preview for inauzwaapp failed. Why did it fail? →

Name Link
🔨 Latest commit 90db505
🔍 Latest deploy log https://app.netlify.com/projects/inauzwaapp/deploys/68e0b6a3765e250008325b8d

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 4, 2025

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
test 90db505 Oct 04 2025, 05:55 AM

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.

2 participants