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

    12/23/2021, 2:32 PM
    Added the middleware?
  • r

    rp

    12/23/2021, 2:33 PM
    If yes, then whats the error that you are getting and how are you qquerying your API?
  • g

    gaurang7

    12/23/2021, 2:33 PM
    message has been deleted
  • r

    rp

    12/23/2021, 2:34 PM
    status code?
  • r

    rp

    12/23/2021, 2:34 PM
    Can I see the header tab?
  • g

    gaurang7

    12/23/2021, 2:38 PM
    My bad! @User I had missed EmailPassword.init() in recipeList
  • g

    gaurang7

    12/23/2021, 2:38 PM
    Thanks for the concern
  • r

    rp

    12/23/2021, 2:38 PM
    ah! is it working now?
  • g

    gaurang7

    12/23/2021, 2:38 PM
    It is
  • r

    rp

    12/23/2021, 2:38 PM
    awesome!
  • v

    Vetro

    12/23/2021, 7:26 PM
    rp, sorry for interrupting again, I decided, I will try to refresh session during SSR and then proceed to call the backend API (without refresh). I don't understand what
    sIRTFrontend
    does. After login, the
    sIRTFrontend
    contains some string (uid?) same as
    sIdRefreshToken
    , but after page refresh, its content change to the 'remove', and
    sRefreshToken
    dissapears from cookies. I need that refresh token to refresh the session manually while SSR... How Can I retrieve the refresh token If
    sIRTFrontend
    contains 'remove'? Thank you
  • r

    rp

    12/23/2021, 7:39 PM
    hey @User ,
    sIRTFrontend
    is meant to serve as a proxy to the frontend SDK to know if the refresh token (which is in httpOnly cookies) is still present or not. If the value of this is
    remove
    then it means that the session no longer exists.
  • r

    rp

    12/23/2021, 7:39 PM
    If the access token is expired during SSR, the only solution you have is to try and refresh it via the flow I had described.
  • r

    rp

    12/23/2021, 7:46 PM
    if this is not clear, I'd be happy to get on a quick implementation call to help figure this out 🙂
  • r

    rp

    12/23/2021, 7:46 PM
    You can book a slot here: https://supertokens.io/call-user
  • v

    Vetro

    12/23/2021, 7:50 PM
    ok, but is it normal for
    refreshToken
    to disapear?
    accessToken
    is present
  • r

    rp

    12/23/2021, 7:50 PM
    that's weird..
  • v

    Vetro

    12/23/2021, 7:50 PM
    now If I'll manually remove token (to test) there is no refresh ...
  • v

    Vetro

    12/23/2021, 7:51 PM
    but after redirect to another subpage, website plugin find the refresh somehow and refresh token automaticly
  • r

    rp

    12/23/2021, 7:52 PM
    so the refresh token is saved against the refresh API path
  • r

    rp

    12/23/2021, 7:52 PM
    which is /auth/session/refresh
  • r

    rp

    12/23/2021, 7:52 PM
    for chrome, if you navigate to that path in the browser (api domain), you will see the refresh token if it exists
  • r

    rp

    12/23/2021, 7:52 PM
    or if you use firefox, you will see it all the time
  • v

    Vetro

    12/23/2021, 7:55 PM
    hm, after navigation to
    http://localhost:3000/api/auth
    I'm getting the 404 from nuxt 😄
  • r

    rp

    12/23/2021, 7:55 PM
    yea there isn't any API on /api/auth
  • r

    rp

    12/23/2021, 7:56 PM
    and the API is actually POST /api/auth/session/refersh. IF you navigate via your browser, you are sending a GET request. But even with that, you should still see the refresh token in the cookie
  • v

    Vetro

    12/23/2021, 7:58 PM
    hm, no refresh token is present somehow
  • r

    rp

    12/23/2021, 7:58 PM
    What's the path you are on?
  • v

    Vetro

    12/23/2021, 7:59 PM
    http://localhost:3000/api/auth
  • r

    rp

    12/23/2021, 7:59 PM
    navigate to
    http://localhost:3000/api/auth/session/refresh
    and then check the cookie storage
Powered by Linen
Title
r

rp

12/23/2021, 7:59 PM
navigate to
http://localhost:3000/api/auth/session/refresh
and then check the cookie storage
View count: 2