@appconda/nextjs 1.0.90 → 1.0.92

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.
@@ -22,6 +22,7 @@ export const actionClient = createSafeActionClient({
22
22
  });
23
23
  export const authenticatedActionClient = actionClient.use(async ({ next }) => {
24
24
  const session = await getServerSession(authOptions());
25
+ //@ts-ignore
25
26
  if (!session?.user) {
26
27
  throw new AuthenticationError("Not authenticated");
27
28
  }
@@ -1,2 +1,3 @@
1
1
  export * from "./actionClient";
2
2
  export * from "./auth";
3
+ export * from "./nextAuthHandler";
@@ -1,2 +1,3 @@
1
1
  export * from "./actionClient";
2
2
  export * from "./auth";
3
+ export * from "./nextAuthHandler";
@@ -0,0 +1 @@
1
+ export declare const handler: any;
@@ -0,0 +1,3 @@
1
+ import NextAuth from "next-auth";
2
+ import { authOptions } from "./authOptions";
3
+ export const handler = NextAuth(authOptions());
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@appconda/nextjs",
3
3
  "homepage": "https://appconda.io/support",
4
4
  "description": "Appconda is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
5
- "version": "1.0.90",
5
+ "version": "1.0.92",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "dist/index.js",
8
8
  "types": "dist/index.d.ts",
@@ -28,6 +28,7 @@ export const actionClient = createSafeActionClient({
28
28
 
29
29
  export const authenticatedActionClient = actionClient.use(async ({ next }) => {
30
30
  const session = await getServerSession(authOptions());
31
+ //@ts-ignore
31
32
  if (!session?.user) {
32
33
  throw new AuthenticationError("Not authenticated");
33
34
  }
@@ -1,2 +1,3 @@
1
1
  export * from "./actionClient";
2
2
  export * from "./auth";
3
+ export * from "./nextAuthHandler";
@@ -0,0 +1,7 @@
1
+
2
+
3
+ import NextAuth from "next-auth";
4
+ import { authOptions } from "./authOptions";
5
+
6
+ export const handler = NextAuth(authOptions());
7
+