@neondatabase/auth 0.1.0-beta.3 → 0.1.0-beta.5
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.
- package/dist/next/index.mjs +1 -5
- package/package.json +2 -2
package/dist/next/index.mjs
CHANGED
|
@@ -7,10 +7,7 @@ import { NextRequest, NextResponse } from "next/server";
|
|
|
7
7
|
import { cookies, headers } from "next/headers";
|
|
8
8
|
|
|
9
9
|
//#region src/next/errors.ts
|
|
10
|
-
const ERRORS = {
|
|
11
|
-
MISSING_AUTH_BASE_URL: "Missing environment variable: NEON_AUTH_BASE_URL. \n You must provide the auth url of your Neon Auth instance in environment variables",
|
|
12
|
-
NEON_AUTH_MIDDLEWARE_NOT_FOUND: "You are calling `neonAuth` on a route that is not covered by `neonAuthMiddleware`. Make sure it is running on all paths you are calling `neonAuth` from by updating your middleware config in `(middleware|proxy).(js|ts)`."
|
|
13
|
-
};
|
|
10
|
+
const ERRORS = { MISSING_AUTH_BASE_URL: "Missing environment variable: NEON_AUTH_BASE_URL. \n You must provide the auth url of your Neon Auth instance in environment variables" };
|
|
14
11
|
|
|
15
12
|
//#endregion
|
|
16
13
|
//#region src/next/constants.ts
|
|
@@ -236,7 +233,6 @@ const NEON_AUTH_BASE_URL = process.env.NEON_AUTH_BASE_URL;
|
|
|
236
233
|
* ```
|
|
237
234
|
*/
|
|
238
235
|
const neonAuth = async () => {
|
|
239
|
-
if (!(await headers()).has(NEON_AUTH_HEADER_MIDDLEWARE_NAME)) throw new Error(ERRORS.NEON_AUTH_MIDDLEWARE_NOT_FOUND);
|
|
240
236
|
return await fetchSession();
|
|
241
237
|
};
|
|
242
238
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neondatabase/auth",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.5",
|
|
4
4
|
"description": "TypeScript SDK for Neon Auth - authentication for PostgreSQL with multiple adapter support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"better-auth": "1.4.6-beta.3",
|
|
103
103
|
"zod": "4.1.12",
|
|
104
104
|
"jose": "6.1.2",
|
|
105
|
-
"@neondatabase/auth-ui": "
|
|
105
|
+
"@neondatabase/auth-ui": "0.1.0-alpha.3"
|
|
106
106
|
},
|
|
107
107
|
"peerDependencies": {
|
|
108
108
|
"react": ">=18.0.0",
|