But when I call SuperTokens.doesSessionExist() it ...
# general
k
But when I call SuperTokens.doesSessionExist() it returns false. This should be true after a successful call to /signin right? And the cookies should automatically be set in my browser? I only see one cookie when I use devtools to inspect them (although I'm not sure you can see http-only cookies with devtools??)
r
But when I call SuperTokens.doesSessionExist() it returns false. This should be true after a successful call to /signin right? And the cookies should automatically be set in my browser? I only see one cookie when I use devtools to inspect them (although I'm not sure you can see http-only cookies with devtools??)
Can I see the appInfo config on the frontend and backend? Also the url on which you are querying the server? Finally a screenshot of the response headers when you call the login API
k
Copy code
app_info=InputAppInfo(
        app_name="reps",
        api_domain="http://localhost:8000",
        website_domain="http://localhost:3000",
        # api_base_path="/api/auth",
        api_base_path="/auth",
        website_base_path="/"
    ),
not sure how to post code in discord
r
You can google how to post code on discord 🙂
But the app_info looks fine. Can I see the other info please?
k
Here's the url for the request:
How do I get the appinfo on the frontend?
Here are some of the response headers:
r
Ah I see. That’s the problem. You need to either send a request to localhost, or change the api_domain value to 127.0.0.1:8000 in the app info object
k
gotcha, I'll make that switch and see if it helps
hmm same thing after changing
Copy code
app_info=InputAppInfo(
        app_name="reps",       
    api_domain="http://127.0.0.1:8000",
website_domain="http://localhost:3000",
        # api_base_path="/api/auth",
        api_base_path="/auth",
        website_base_path="/"
    ),
r
Are you loading the frontend (website) on localhost or 127.0.0.1?
k
do I need to change the url I type into the browser as well?
r
No. If you are typing localhost:3000 then it’s fine
Can I see the response headers once again? This time the full thing, not halfway cut please
Anything got printed on the console log? Also, what are the values set in the cookies section?
(Application -> cookies section)
k
nothing printed to console besides the response json and value of doesSessionExist() that I printed for debugging
should I see those other cookies in the devtools?
r
Got it. Have you added our interceptors on the frontend?
Are you using axios or fetch?
k
axios
have NOT added interceptors
r
So you need to do that
k
I see
r
If you follow the quick setup, one of the steps is to add interceptors for axios
You need to do that for each axios instance you import
k
I think I have a global axios instance but I can at least do it on this page I"m working with to test
Thanks for the help! I think I'll save that for tomorrow and head to sleep
🙏
Dang, I added the axios interceptors and I'm still seeing same results
r
Hmmm.
Do you want to get on a call to debug?
k
Sure, I have about 40 minutes right now
r
I’m busy right now
But you can book a call using the above link
k
oh ok, I already signed up for a session tomorrow morning around this time haha
r
Ah fair enough! Talk to you then
k
Thanks!
r
Oh wait. I think I postponed the call to be on Monday.
Cause the time you had picked didn’t work for me
k
oh ok, yeah I see that update email now
that works too
2 Views