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
  • s

    Sun Walker

    06/13/2020, 8:59 AM
    Nothing has changed, only NPM install
  • r

    rp

    06/13/2020, 9:00 AM
    I see. so when you send a query using fetch / axios, do you catch errors from that?
  • s

    Sun Walker

    06/13/2020, 9:00 AM
    Nope
  • r

    rp

    06/13/2020, 9:00 AM
    so that's the issue.
  • s

    Sun Walker

    06/13/2020, 9:00 AM
    But I also don't make any requests on app load
  • s

    Sun Walker

    06/13/2020, 9:01 AM
    I actually have no idea how that is occuring
  • r

    rp

    06/13/2020, 9:01 AM
    are you sure?
  • r

    rp

    06/13/2020, 9:01 AM
    cause the only way this happens is if an API request is being made
  • s

    Sun Walker

    06/13/2020, 9:01 AM
    Oh wait of course I am
  • s

    Sun Walker

    06/13/2020, 9:01 AM
    My bad
  • s

    Sun Walker

    06/13/2020, 9:02 AM
    I'm making requests yup, perhaps it's the change to 2.0 on the back-end
  • r

    rp

    06/13/2020, 9:03 AM
    No worries. So you are making an API request to a path that requires an active session. You are getting a session expired error code cause those tokens are not being sent. Check your cookie_domain value
  • s

    Sun Walker

    06/13/2020, 9:03 AM
    Ah, nice
  • s

    Sun Walker

    06/13/2020, 9:04 AM
    How do I change the config for supertokens, the config at usr/etc/supertokens is read-only
  • r

    rp

    06/13/2020, 9:04 AM
    Change it in the docker start command and restart the container
  • s

    Sun Walker

    06/13/2020, 9:05 AM
    Oh this isn't being run with docker! 😄 I'm not that far yet, just local dev and I'm doing docker step by step
  • s

    Sun Walker

    06/13/2020, 9:05 AM
    Docker works but it's too many variables to keep track of rn for myself
  • r

    rp

    06/13/2020, 9:05 AM
    ah i see. so use sudo to change the config.yaml file
  • s

    Sun Walker

    06/13/2020, 9:05 AM
    Ah sure
  • r

    rp

    06/13/2020, 9:06 AM
    and then stop and start the supertokens instance
  • s

    Sun Walker

    06/13/2020, 9:07 AM
    Also, using the new errorHandler() how does one allow this to console.log or add error's to a logger?
  • r

    rp

    06/13/2020, 9:08 AM
    you can override the default error handlers for each type of error. In those custom handlers, you can do whatever you want, like logging etc
  • r

    rp

    06/13/2020, 9:08 AM
    See https://supertokens.io/docs/nodejs/usage-with-express/custom_error_handling
  • s

    Sun Walker

    06/13/2020, 9:12 AM
    And I think I've got another error, I managed to make some sort of require cycle
  • s

    Sun Walker

    06/13/2020, 9:12 AM
    message has been deleted
  • r

    rp

    06/13/2020, 9:14 AM
    ah i see. that's an issue with our SDK. Will fix it ASAP. If you can, please raise this issue on github. Things should still work though
  • s

    Sun Walker

    06/13/2020, 9:16 AM
    ah gotcha, and another thing
    SuperTokensRequest.init("https://api.example.com/api/refresh", 440, {});
    Is the recommended init for axios
    SuperTokensRequest.init("https://api.example.com/api/refresh", 440, true, {});
    is the recommended init for fetch axios init shows TS error
  • s

    Sun Walker

    06/13/2020, 9:16 AM
    ill raise the first on github now
  • r

    rp

    06/13/2020, 9:17 AM
    For axios, import from "supertokens-react-native/axios"
  • s

    Sun Walker

    06/13/2020, 9:17 AM
    Ah!
Powered by Linen
Title
s

Sun Walker

06/13/2020, 9:17 AM
Ah!
View count: 2