How can I get the session data within axios interceptor without calling /api/auth/session ? #3294
Unanswered
fangwohung
asked this question in
Help
Replies: 1 comment 1 reply
-
If you are out of the React lifecycles (eg cannot use the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Question 💬
I'm using next auth 4.0.0-beta.7.
Even though I can get the session data within axios interceptor by calling getSession(), it will make an http request.
If the client calls 3 APIs, it will execute 6 http requests due to getSession().
I just want to reduce the amount of calling APIs, is there any ways to avoid this ?
How to reproduce ☕️
N/A
Contributing 🙌🏽
No, I am afraid I cannot help regarding this
Beta Was this translation helpful? Give feedback.
All reactions