Next.js Discord

Discord Forum

How to deduplicate session requests from auth.js?

Unanswered
Rhinelander posted this in #help-forum
Open in Discord
Avatar
RhinelanderOP
So in my auth.ts I log everytime session is called when i refresh page i get like 10 logs that session was called.
events: {
    session: () => {
      console.log("Session created/updated");
    },
  },


Why is that happending? I dedup everything as I cache it
export default cache(auth);

and use that instead of default auth

What am I doing wrong?

0 Replies