This repository was archived by the owner on Dec 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add invite codes #35
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Pertempto <Pertempto@users.noreply.github.com>
Co-authored-by: Pertempto <Pertempto@users.noreply.github.com>
Co-authored-by: Pertempto <Pertempto@users.noreply.github.com>
Fixed "Unauthorized" and RLS policy violation errors when creating or revoking invite codes. The issue was that API endpoints were not properly setting the JWT authentication context for RLS policy evaluation. Changes: - Added createSupabaseWithJWT() helper in auth.ts to create Supabase clients with JWT auth context - Updated /api/invites/create to use JWT-authenticated client for database operations - Updated /api/invites/revoke to use JWT-authenticated client for database operations - Fixed token validation to pass JWT to auth.getUser() Now auth.uid() in RLS policies correctly evaluates to the authenticated user's ID. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Updates to Preview Branch (add-invite-codes) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
Moved storage policies from migration-only to declarative schema file to prevent future db diff commands from trying to drop them. Changes: - Created supabase/schemas/11_storage.sql with all storage bucket and RLS policies - Storage policies now part of declarative schema source of truth - Prevents unwanted policy drops when running supabase db diff This follows the project's pattern of defining infrastructure in declarative schemas rather than migrations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Changes RequestedPlease address the following before I can approve this PR:
Summary of Changes
Overall Feedback
I left a few inline comments with the highest-impact issues. Ping me once you push fixes and tests and I’ll re-review quickly. @Pertempto |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.