Skip to content

fix: strengthen environment validation and remove empty string fallbacks#658

Open
akashgoudsidduluri wants to merge 3 commits into
durdana3105:mainfrom
akashgoudsidduluri:fix/environment-validation-cleanup
Open

fix: strengthen environment validation and remove empty string fallbacks#658
akashgoudsidduluri wants to merge 3 commits into
durdana3105:mainfrom
akashgoudsidduluri:fix/environment-validation-cleanup

Conversation

@akashgoudsidduluri
Copy link
Copy Markdown
Contributor

Summary

This PR improves environment validation by ensuring that a valid Supabase URL and Anon/Publishable Key are present before the application starts.

Changes

  • Added schema refinement to require:
    • at least one Supabase URL
    • at least one Supabase Anon/Publishable Key
  • Removed empty string fallbacks from exported Supabase configuration values
  • Preserved support for both VITE_* and NEXT_PUBLIC_* environment variable prefixes

Benefits

  • Improves type safety
  • Fails fast when required configuration is missing
  • Avoids silently exporting empty strings for critical Supabase configuration

Fixes #639

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 2026

@akashgoudsidduluri is attempting to deploy a commit to the durdana3105's projects Team on Vercel.

A member of the Team first needs to authorize it.

@akashgoudsidduluri
Copy link
Copy Markdown
Contributor Author

Hey @durdana3105 can you review this PR.

@durdana3105
Copy link
Copy Markdown
Owner

Hey @durdana3105 can you review this PR.

please resolve the merge conflicts

@akashgoudsidduluri
Copy link
Copy Markdown
Contributor Author

Hey @durdana3105 i have resolved the conflicts, you can review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Environment Validation Cleanup

2 participants