© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Guilherme Rosa
ReactJS
Great article, Kelvin! I have issues with typescript: Property 'accessToken' does not exist on type 'Session'.ts(2339) with .accessToken .idToken and .error . Did you face this issues or did I do something wrong? Thanks.
Sina A
To resolve this, you can extend the Session interface in Next-Auth:
declare module "next-auth" { interface Session { user: { accessToken: string; tokenExpiration: number; idToken: string; } & DefaultSession["user"]; error: string; } }