Skip to content

Commit 1389848

Browse files
committed
fix session
1 parent a0dc999 commit 1389848

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

apps/X/app/lib/auth.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,10 @@ export const authOptions = {
115115
Secret: process.env.NEXTAUTH_SECRET || "secr3t",
116116

117117
callbacks: {
118-
async session({
119-
token,
120-
session,
121-
}: {
122-
token: JWT;
123-
session: Session & { user: { id: string | undefined } };
124-
}) {
118+
async session({ token, session }: { token: JWT; session: any }) {
125119
session.user.id = token.sub;
126120
return session;
127121
},
128-
//},
129-
130122
async signIn({ user, account, profile }: any) {
131123
if (account?.privider === "github" || account?.provider === "google") {
132124
const existingUser = await db.user.findUnique({
@@ -144,11 +136,11 @@ export const authOptions = {
144136
});
145137
} catch (error) {
146138
console.log("Error while creating user from Github", error);
147-
return false;
139+
// return false;
148140
}
149141
}
150-
return true;
151142
}
143+
return true;
152144
},
153145
},
154146
page: {

0 commit comments

Comments
 (0)