Auth0 getAccessToken() causing server component to rerender
Unanswered
Daggertooth pike conger posted this in #help-forum
Daggertooth pike congerOP
So I have a page containing a list of items with a very simple flow:
- The app router server component page fetches the list on load
- The user can click a button to create a new item, and a server action is called to put it in our DB
-
Or so I thought, when doing some other debugging I commented out all of the tagging &
I believe I've traced this down to a call for
At this point, putting all of the tagging stuff back in makes the page work as expected.
This might be an issue/question for the Auth0 community, but I thought I'd post here incase anyone has encountered anything similar. Thanks!
- The app router server component page fetches the list on load
- The user can click a button to create a new item, and a server action is called to put it in our DB
-
revalidateTag is used to trigger a refetch of the list, which in turn updates the UI with the newly-created item.Or so I thought, when doing some other debugging I commented out all of the tagging &
revalidateTag calls, but the list was still being refetched automatically.I believe I've traced this down to a call for
getAccessToken() from the auth0/nextjs-auth0 package, when hardcoding the accessToken in a string, the app router page stops being rerendered.At this point, putting all of the tagging stuff back in makes the page work as expected.
This might be an issue/question for the Auth0 community, but I thought I'd post here incase anyone has encountered anything similar. Thanks!