https://supertokens.com/ logo
Docs
Join the conversationJoin Discord
Channels
community
contributing
general
github-activity
info
introductions
new-releases
random
security
support-questions
welcome-0xdelusion
welcome-aj-ya
welcome-aleksandrc
welcome-alpinjs
welcome-amberlamps1
welcome-andrew-rodriguez
welcome-ankit-choudhary
welcome-anthony-stod-custodio
welcome-call-in
welcome-chwalbox
welcome-claybiokiller
welcome-co7e
welcome-cosmoecwsa
welcome-devdag
welcome-dinso
welcome-drebotelho
welcome-elio
welcome-ernest
welcome-foxbarrington
welcome-fromscratch
welcome-galto4ir
welcome-goetzum
welcome-hay-kot
welcome-himanshu-kukreja
welcome-hossambarakat
welcome-ichikawakazuto
welcome-jahir9991
welcome-jamesl
welcome-jerry123424
welcome-john-oliver
welcome-jonas-alexanderson
welcome-jxyz
welcome-kelvinwop
welcome-kraz
welcome-lancekey
welcome-leoo
welcome-lukeacollins
welcome-m-j-mon
welcome-malik-khoja
welcome-marco
welcome-mardadi
welcome-meshguy
welcome-metamorph
welcome-mike-tectu
welcome-mirzok
welcome-mozomig
welcome-naberyou66_
welcome-nacer
welcome-namratha
welcome-naveenkumar
welcome-nightlight
welcome-nischith
welcome-notankit
welcome-olawumi
welcome-pavan-kumar-reddy-n
welcome-pineappaul
welcome-poothebear
welcome-rick
welcome-samuel-qosenergy
welcome-samuelstroschein
welcome-shubhamgoel23
welcome-shubhamkaushal
welcome-sidebar
welcome-surajsli
welcome-suyash_
welcome-syntaxerror
welcome-tauno
welcome-tauno
welcome-tawnoz
welcome-teclali
welcome-tls
welcome-turbosepp
welcome-vikram_shadow
welcome-yann
Powered by Linen
general
  • a

    anujchhabria

    01/29/2021, 12:13 PM
    I think the nuxt axios module works slightly differently
  • a

    anujchhabria

    01/29/2021, 12:13 PM
    https://github.com/nuxt-community/axios-module
  • a

    anujchhabria

    01/29/2021, 12:13 PM
    They do have a method to extend axios - https://axios.nuxtjs.org/extend
  • a

    anujchhabria

    01/29/2021, 12:13 PM
    Perhaps i can write my own interceptors?
  • r

    rp

    01/29/2021, 12:14 PM
    can you edit the axios.js file inside supertokens-website package in node_modules to print something out at the start of the makeSuper function?
  • r

    rp

    01/29/2021, 12:15 PM
    and if that gets printed out, then you can print some more things to see the code flow
  • r

    rp

    01/29/2021, 12:15 PM
    and debug that way perhaps...
  • r

    rp

    01/29/2021, 12:15 PM
    writing your own interceptors would be way more difficult
  • a

    anujchhabria

    01/29/2021, 12:15 PM
    yep, let me try it now
  • a

    anujchhabria

    01/29/2021, 12:25 PM
    // Add a request interceptor axiosInstance.interceptors.request.use(interceptorFunctionRequestFulfilled, function (error) { return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) { throw error; }); }); });
  • a

    anujchhabria

    01/29/2021, 12:25 PM
    console within this does not output anything
  • r

    rp

    01/29/2021, 12:25 PM
    the interceptor is probably being applied.. i can't see any code path where you are calling makeSuper and it's being applied
  • a

    anujchhabria

    01/29/2021, 12:25 PM
    similarly with the response interceptor
  • a

    anujchhabria

    01/29/2021, 12:27 PM
    I didn't get you
  • r

    rp

    01/29/2021, 12:27 PM
    have you sent a request to the API that creates a session?
  • r

    rp

    01/29/2021, 12:28 PM
    > I didn't get you Sorry. I meant seems to be applied.
  • a

    anujchhabria

    01/29/2021, 12:28 PM
    yep, thats the thing, i did not send a request to create a session, hence no cookie is set, however i did run another api using axios and that returned the data, not an unauth error
  • r

    rp

    01/29/2021, 12:29 PM
    If it returned something, then that API is not checking for session verification properly
  • r

    rp

    01/29/2021, 12:29 PM
    cause at least, it should have returned a 401 error
  • r

    rp

    01/29/2021, 12:29 PM
    since you called it without an authenticated session
  • a

    anujchhabria

    01/29/2021, 12:31 PM
    let me check
  • a

    anujchhabria

    01/29/2021, 12:50 PM
    yep, that was my bad
  • a

    anujchhabria

    01/29/2021, 12:50 PM
    im getting a 440 response now
  • r

    rp

    01/29/2021, 12:50 PM
    sounds good!
  • a

    anujchhabria

    01/29/2021, 12:50 PM
    but now, i have implemented the login as well
  • a

    anujchhabria

    01/29/2021, 12:50 PM
    message has been deleted
  • r

    rp

    01/29/2021, 12:51 PM
    so after login, it's not working still?
  • a

    anujchhabria

    01/29/2021, 12:51 PM
    nope
  • r

    rp

    01/29/2021, 12:52 PM
    what's the 440 error message?
  • a

    anujchhabria

    01/29/2021, 12:52 PM
    message has been deleted
Powered by Linen
Title
a

anujchhabria

01/29/2021, 12:52 PM
message has been deleted
View count: 2