Hi I am stuck with an issue So I have my login se...
# support-questions
y
Hi I am stuck with an issue So I have my login server at dev-dashboard.example.com/login and after getting code I am calling the signinup API that is returning me cookies and succesful response. I have set the cookie domain to .example.com and sessionScope to .example.com. But the cookies are not getting set in my browser on dev-dashboard.example.com/login. any ideas?
r
hey @Yashwant
can you enable frontend and backend debug logging and show me the output? Also, can you show me the response headers from the login API response (a screenshot will do)?
y
maybe I have to set the withCredentials header to true?
r
That should be set on its own if our interceptor is being applied
y
Okay
r
If you send over the debug logs, we can get more clarity on what’s happening
y
this is the response
the cookies are sent back but are not set to the window
r
Can I see the cookie store contents?
y
yes
r
Can you enable debug logs and show me the output?
I want to also see the cookies that are stored in the applications tab
y
Not sure how to do that
r
There is a section called “troubleshooting” in the docs
y
Okay I'll return in some time gtg.. I'll look into the docs
Thanks
Hi. so we are not actually calling supertokens.init() in frontend as we are using custom UI, maybe thats the problem.. What all do we need to add to frontend for a custom UI?
Hence the interceptors you were talking about were not called
r
Right yea. So you should add supertokens.init
And if using axios, then you should add axios interceptors. (For fetch it gets added automatically)
You can follow the “plain javascript” code snippets in the docs
y
Got it
Thanks... your docs are really good
r
Thanks
y
So cookies are not getting set up even in localhost
r
Hey @Yashwant
Can I see the logs on the frontend and backend for when you are calling the login API?
y
Okay
I cant see any logs in frontend
@rp
r
Are you using axios or fetch on the frontend?
y
no we are using ajax
r
Ah I see. We only support axios or fetch
So you should use one of those
And add supertokens interceptors to axios if you are using that
y
Is there any any workaround if I want to use Ajax?
just curious
r
You can make your own interceptor I guess.
y
Okay Thanks
r
lmk if it still doesn't work with axios / fetch.
3 Views