When utilizing next-auth with TypeScript, I am attempting to define callback functions for jwt and session as shown below.
callbacks: {
async jwt({ token, account }) {
if (account) {
token.accessToken = account.access_token
}
return token
},
async session({ session, token, user }) {
console.log('jwt callback')
// Send properties to the client, like an access_token from a provider.
session.accessToken = token.accessToken
return session
},
}, However, TypeScript is presenting type errors for the parameters of these functions. Is there a method to specify types for them? https://i.sstatic.net/xBzwZ.png