Unauthorized fetch with server side rendering, (im...
# support-questions-legacy
r
Unauthorized fetch with server side rendering, (implement front end server side rendering), Next.js and Axios
r
Hey @ressiject
Is your api domain and website domain different? What are the values?
r
yes
client will access at localhost:3000
0
while we are trying to implement front-end with server side rendering
should i try to handle with user cache ?
i mean we are treat api as gate way where front-end only ask for resource
r
I see. So the cookies are not being sent to localhost:3000? (During server side rendering)
r
yes
r
Do the cookies get sent to the api gateway?
r
nope
r
whats the value of apiDomain and websiteDomain that you have set in the appInfo? Also, can i see the set-cookie header response when you call the sign in API (screenshot from chrome will do)
r
8000 for api, 3000 for website
my solution now is use cookie and send
XD
r
what do you mean?
r
i mean i write front-end
by read cookie from user computer
and send to website domain
r
i don't think i undersatnd
r
i mean the problem here
not when we send request from front-end to back-end
i mean
it look like comunication between client and server (in front end)
its didn't send cookies from user computer to front-end
r
so if the cookies are attached to localhost:8000, they should also be sent to webserver on localhost:3000 when you navigate to the site from the browser.
r
oh i see
then why should i track the cookie
it look like some bug here
r
what do you mean why should you track cookies.
r
i mean
i write that part myself
r
you don't need to. Just use our SDKs 🙂
r
thanks
it a little bit confuse
because it work before
r
hmm
maybe see what you changed and try and debug
r
ok thank you 🙂
it problem in my team XD
they ask me to ask you
r
hmm ok
haha.. if you can't figure out the issue, maybe try seeing one of our example apps
r
we looked before
thank you
next.js is a little bit different
r
we have a nextjs example app as well
try it with
npx create-supertokens-app
command