Skip to content

fix: resolve RLS auth issue on invite pages - #30

Merged
lbowsher merged 1 commit into
mainfrom
lb/draft-rankings-integration
Mar 22, 2026
Merged

lbowsher merged 1 commit into
mainfrom
lb/draft-rankings-integration

Conversation

@lbowsher

Copy link
Copy Markdown
Owner

Summary

  • Move getUser() call before any database queries on both league and team invite pages
  • Ensures the authenticated session is established before RLS policies evaluate
  • Fixes league invite links failing for newly authenticated users (DB queries returned null due to RLS rejecting unauthenticated reads)

Test plan

  • Click a league invite link while logged out → should redirect to login, then back to the invite page showing available teams
  • Click a team invite link while logged out → same flow, should show the team join form
  • Click a league invite link while logged in → should go directly to the invite page

🤖 Generated with Claude Code

… DB queries

Move getUser() call before any database queries on both league and team
invite pages so the authenticated session is established before RLS
policies evaluate, fixing league invite links failing for new users.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel

vercel Bot commented Mar 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
fanteasy Ready Ready Preview, Comment Mar 22, 2026 6:27am

@lbowsher
lbowsher merged commit 93504a3 into main Mar 22, 2026
3 checks passed
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