@solvapay/auth 1.0.1-preview.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +5 -3
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -213,14 +213,16 @@ Both adapters and Next.js utilities work in Edge runtimes (Vercel Edge Functions
213
213
 
214
214
  ## Next.js Integration
215
215
 
216
- These utilities work seamlessly with Next.js middleware. Typically, you'll set the `x-user-id` header in your middleware after authentication:
216
+ These utilities work seamlessly with Next.js authentication middleware.
217
+ In Next.js 16, this middleware lives in `proxy.ts` and typically sets the
218
+ `x-user-id` header after authentication:
217
219
 
218
220
  ```ts
219
- // middleware.ts
221
+ // proxy.ts
220
222
  import { NextResponse } from 'next/server'
221
223
  import type { NextRequest } from 'next/server'
222
224
 
223
- export async function middleware(request: NextRequest) {
225
+ export async function proxy(request: NextRequest) {
224
226
  // Extract user ID from your auth system (Supabase, Auth0, etc.)
225
227
  const userId = await getUserIdFromAuth(request)
226
228
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solvapay/auth",
3
- "version": "1.0.1-preview.1",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "sideEffects": false,
41
41
  "peerDependencies": {
42
- "jose": "^5.0.0"
42
+ "jose": "^6.2.2"
43
43
  },
44
44
  "devDependencies": {
45
45
  "tsup": "^8.5.1",