Skip to content

Commit 6ed377a

Browse files
jonphippsclaude
andcommitted
fix: resolve NextAuth TypeScript compilation errors and Cerbos Hub config
- Fix NextAuth v5 import syntax and configuration typing - Correct .cerbos-hub.yaml format removing invalid 'source' field - Use proper NextAuthConfig type import pattern - Enable successful TypeScript compilation for admin-portal 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 79aae9d commit 6ed377a

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

.cerbos-hub.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@
22
# This connects the repository to Cerbos Hub for GitOps policy management
33
---
44
apiVersion: api.cerbos.cloud/v1
5-
source:
6-
driver: git
7-
git:
8-
protocol: https
9-
repository: github.com/iflastandards/standards-dev
10-
directory: cerbos/policies # Policies are stored in cerbos/policies/
5+
workDir: cerbos/policies
116
labels:
127
latest: # 'latest' label pointing to the HEAD of the main branch
138
branch: main

apps/admin-portal/src/app/lib/auth.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import NextAuth, { NextAuthConfig } from "next-auth"
1+
import NextAuth from "next-auth"
22
import GitHub from "next-auth/providers/github"
3+
import type { NextAuthConfig } from "next-auth"
34

45
const authOptions: NextAuthConfig = {
56
debug: process.env.NODE_ENV === "development",
@@ -121,6 +122,4 @@ const authOptions: NextAuthConfig = {
121122
},
122123
};
123124

124-
const nextAuth = NextAuth(authOptions);
125-
126-
export const { handlers, auth, signIn, signOut } = nextAuth;
125+
export const { handlers, auth, signIn, signOut } = NextAuth(authOptions);

0 commit comments

Comments
 (0)