Skip to content

Commit 27216fe

Browse files
committed
refactor: remove unnecessary types
1 parent 90e1e97 commit 27216fe

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/@types/next-auth.d.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
import { DefaultSession, DefaultUser } from 'next-auth';
1+
import { DefaultUser } from 'next-auth';
22
import { DefaultJWT } from 'next-auth/jwt';
33

44
declare module 'next-auth' {
5-
interface Session {
6-
user: {
7-
accessToken?: string;
8-
refreshToken?: string;
9-
} & DefaultSession;
10-
}
115
interface User extends DefaultUser {
126
accessToken?: string;
137
refreshToken?: string;

src/app/api/auth/[...nextauth]/route.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import NextAuth from 'next-auth';
66
import CredentialsProvider from 'next-auth/providers/credentials';
77

88
const handler = NextAuth({
9+
session: {
10+
maxAge: 1 * 24 * 60 * 60,
11+
},
912
pages: {
1013
signIn: SIGN_IN_PAGE_PATHNAME,
1114
},

0 commit comments

Comments
 (0)