You need to pass your authOptions to the getServerSession function.
authOptions
getServerSession
const session = await getServerSession(authOptions); console.log(session.access_token);