Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,33 @@ jobs:

npm publish --provenance --tag "$DIST_TAG"

# Also publish under deprecated auth-helpers names for backward compatibility
# This helps users still using the old packages (especially due to LLM recommendations)
echo "Publishing under legacy auth-helpers names..."

# Publish as @supabase/auth-helpers-nextjs
echo "Publishing as @supabase/auth-helpers-nextjs..."
sed -i 's|"name": "@supabase/ssr"|"name": "@supabase/auth-helpers-nextjs"|g' package.json
npm publish --provenance --tag "$DIST_TAG"

# Publish as @supabase/auth-helpers-react
echo "Publishing as @supabase/auth-helpers-react..."
sed -i 's|"name": "@supabase/auth-helpers-nextjs"|"name": "@supabase/auth-helpers-react"|g' package.json
npm publish --provenance --tag "$DIST_TAG"

# Publish as @supabase/auth-helpers-remix
echo "Publishing as @supabase/auth-helpers-remix..."
sed -i 's|"name": "@supabase/auth-helpers-react"|"name": "@supabase/auth-helpers-remix"|g' package.json
npm publish --provenance --tag "$DIST_TAG"

# Publish as @supabase/auth-helpers-sveltekit
echo "Publishing as @supabase/auth-helpers-sveltekit..."
sed -i 's|"name": "@supabase/auth-helpers-remix"|"name": "@supabase/auth-helpers-sveltekit"|g' package.json
npm publish --provenance --tag "$DIST_TAG"

# Restore original package name for consistency
sed -i 's|"name": "@supabase/auth-helpers-sveltekit"|"name": "@supabase/ssr"|g' package.json

- name: Create GitHub release and branches
if: ${{ steps.release.outputs.release_created == 'true' || steps.release.outputs.prs_created == 'true' }}
run: |
Expand Down
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
# Supabase clients for use in SSR frameworks

This package is useful for using the [Supabase JavaScript library](https://supabase.com/docs/reference/javascript/introduction) in
server-side rendering frameworks.
> **Package Consolidation Notice**: This package replaces the deprecated `@supabase/auth-helpers-*` packages. All framework-specific auth-helpers packages have been consolidated into `@supabase/ssr` for better maintenance and consistency.

It provides a framework-agnostic way of creating a Supabase client.
## Overview

This package provides a framework-agnostic way to use the [Supabase JavaScript library](https://supabase.com/docs/reference/javascript/introduction) in server-side rendering (SSR) frameworks.

## Installation

```bash
npm i @supabase/ssr
```

## Deprecated Packages

The following packages have been deprecated and consolidated into `@supabase/ssr`:

- `@supabase/auth-helpers-nextjs` → Use `@supabase/ssr`
- `@supabase/auth-helpers-react` → Use `@supabase/ssr`
- `@supabase/auth-helpers-remix` → Use `@supabase/ssr`
- `@supabase/auth-helpers-sveltekit` → Use `@supabase/ssr`

If you're currently using any of these packages, please update your dependencies to use `@supabase/ssr` directly.

## Documentation

Please refer to the [official server-side rendering guides](https://supabase.com/docs/guides/auth/server-side) for the latest best practices on using this package in your SSR framework of choice.
19 changes: 11 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"devDependencies": {
"@eslint/js": "^9.3.0",
"@supabase/supabase-js": "^2.43.4",
"@types/node": "^24.3.0",
"@vitest/coverage-v8": "^1.6.0",
"eslint": "^8.57.0",
"prettier": "^3.2.5",
Expand Down
33 changes: 33 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
// Check if this package is being used as one of the deprecated auth-helpers packages
if (typeof process !== "undefined" && process.env?.npm_package_name) {
const packageName = process.env.npm_package_name;
const deprecatedPackages = [
"@supabase/auth-helpers-nextjs",
"@supabase/auth-helpers-react",
"@supabase/auth-helpers-remix",
"@supabase/auth-helpers-sveltekit",
];

if (deprecatedPackages.includes(packageName)) {
console.warn(`
╔════════════════════════════════════════════════════════════════════════════╗
║ ⚠️ IMPORTANT: Package Consolidation Notice ║
║ ║
║ The ${packageName.padEnd(35)} package name is deprecated. ║
║ ║
║ You are now using @supabase/ssr - a unified solution for all frameworks. ║
║ ║
║ The auth-helpers packages have been consolidated into @supabase/ssr ║
║ to provide better maintenance and consistent APIs across frameworks. ║
║ ║
║ Please update your package.json to use @supabase/ssr directly: ║
║ npm uninstall ${packageName.padEnd(42)} ║
║ npm install @supabase/ssr ║
║ ║
║ For more information, visit: ║
║ https://supabase.com/docs/guides/auth/server-side ║
╚════════════════════════════════════════════════════════════════════════════╝
`);
}
}

export * from "./createBrowserClient";
export * from "./createServerClient";
export * from "./types";
Expand Down