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
support-questions
  • r

    rp

    02/07/2021, 5:43 AM
    We add axios / fetch interceptors and when any of your API calls returns 440, we call the refresh API
  • r

    rp

    02/07/2021, 5:43 AM
    the refresh API is a POST request to {apiDomain}/{apiBasePath}/session/refresh
  • r

    rp

    02/07/2021, 5:44 AM
    So if you are implementing your own refresh route, you need to give it the route: {apiBasePath}/session/refresh
  • t

    tredstone

    02/07/2021, 5:44 AM
    i see, so you cannot change that route?
  • r

    rp

    02/07/2021, 5:44 AM
    and you also need to set
    disableDefaultImplementation
    to
    false
  • r

    rp

    02/07/2021, 5:45 AM
    > so you cannot change that route? You can't change the "/session/refresh" part of the route. But you can change the apiBasePath.. so if you set the apiBasePath to "/auth", then the refresh route becomes "/auth/session/refresh". If you set it to "/", then it becomes "/session/refresh"
  • t

    tredstone

    02/07/2021, 5:46 AM
    fortunately the default value that's being used aligns with what i have
  • t

    tredstone

    02/07/2021, 5:47 AM
    ok, thanks for clearing this all up
  • r

    rp

    02/07/2021, 5:49 AM
    the default value of
    apiBasePath
    is
    /auth
    . So the default refresh API is
    /auth/session/refresh
  • t

    tredstone

    02/07/2021, 5:56 AM
    where can i find details of the default token expiration length?
  • r

    rp

    02/07/2021, 5:56 AM
    https://supertokens.io/docs/emailpassword/common-customizations/sessions/change-session-timeout
  • t

    tredstone

    02/09/2021, 2:47 PM
    Morning, I'm not sure if this has been reported, or if anyone else has run into this issue, but in order for my backend to respond to our client, I had to include the following headers in the cors list:
    supertokens-sdk-version
    supertokens-sdk-name
    This was after integrating with superTokens in the front end and modifying the axios instance
  • t

    tredstone

    02/09/2021, 2:48 PM
    any ideas why this might be the case?
  • r

    rp

    02/09/2021, 2:54 PM
    I think you are using an older version of the frontend lib perhaps.. we used to send those headers earlier to maintain protocol versioning
  • r

    rp

    02/09/2021, 2:54 PM
    If you update to a newer version, those are no longer sent.
  • t

    tredstone

    02/09/2021, 9:48 PM
    I've verified that we are using v5 of the front end SDK
  • r

    rp

    02/10/2021, 5:21 AM
    @User we had removed the above two headers from v5 onwards. I'm not sure how it's possible that those are still being sent.. Maybe there is some frontend client of yours that is somehow still using the older version?
  • t

    tredstone

    02/10/2021, 5:23 AM
    the one on my machine right now is v4.3.0, however there are some pending changes that are using v5 my mistake
  • r

    rp

    02/10/2021, 5:23 AM
    makes sense 🙂
  • u

    user

    02/10/2021, 1:21 PM
    Asked @User what he recommends for hosting supertokens on in terms of CPU/memory. He said 1 core / 1GB of RAM is enough
  • r

    rp

    02/10/2021, 1:21 PM
    Thanks @User !
  • u

    user

    02/10/2021, 1:21 PM
    Yeah no problem
  • u

    user

    02/11/2021, 3:23 PM
    message has been deleted
  • u

    user

    02/11/2021, 3:24 PM
    Just signed up and I get an unauthorised error when submitting to the server…
  • u

    user

    02/11/2021, 3:24 PM
    Got this message when trying to refresh session
  • u

    user

    02/11/2021, 3:24 PM
    I'm in safari
  • r

    rp

    02/11/2021, 3:25 PM
    you will need to provide more info
  • r

    rp

    02/11/2021, 3:25 PM
    like the request headers that were sent
  • u

    user

    02/11/2021, 3:26 PM
    message has been deleted
  • r

    rp

    02/11/2021, 3:30 PM
    no session tokens means either the session has expired, or your configs are not properly set
Powered by Linen
Title
r

rp

02/11/2021, 3:30 PM
no session tokens means either the session has expired, or your configs are not properly set
View count: 1