fix: Add missing api-access edge function to unblock new user login#18
Merged
amethystani merged 1 commit intomainfrom Mar 18, 2026
Merged
fix: Add missing api-access edge function to unblock new user login#18amethystani merged 1 commit intomainfrom
amethystani merged 1 commit intomainfrom
Conversation
…new users The frontend was calling /functions/v1/api-access (introduced in e722eea) but the edge function was never deployed, causing all access code attempts to return "Not authenticated". This creates and deploys the missing function which validates codes against the existing access_codes table and records grants in user_access. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
✅ Deploy Preview for gonnaai ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Summary
e722eea) calls/functions/v1/api-accessfor access code validation, but this edge function was never deployed — causing every new user's code submission to return "Not authenticated"supabase/functions/api-access/index.ts— handlesGET /api-access(check existing access) andPOST /api-access/validate(redeem a code)access_codesanduser_accesstables, includingmax_uses,expires_at, andis_activechecks that mirror the original RPC logicsupabase/migrations/add_access_codes.sqlguard migration (no-op against the live DB since those tables already exist)Test plan
CTX-ADM-5Q2F-L8YD-2026) and confirm dashboard unlocks🤖 Generated with Claude Code