• Moere

    Moere

    1 year ago
    Do I need to trigger the refresh of a token myself? at the moment the refresh url is never used and thus the access token expires (gets removed from cookie storage by the browser due of expiry)
  • r

    rp

    1 year ago
    our frontend SDK does the refreshing automatically. The frontend SDK is
    supertokens-website
  • Moere

    Moere

    1 year ago
    I saw in the demo that you do non stop requests (userinfo) to prevent this maybe
  • Moere

    Moere

    1 year ago
    our frontend SDK does the refreshing automatically. The frontend SDK is
    supertokens-website
    @User that is what i use
  • r

    rp

    1 year ago
    And you called the
    init
    function in that?
  • r

    rp

    1 year ago
    have you added interceptors to your
    axios
    or
    fetch
    instance?
  • Moere

    Moere

    1 year ago
    javascript
    import SuperTokensRequest from 'supertokens-website/axios'
    
    SuperTokensRequest.init({
      refreshTokenUrl: 'http://localhost:3000/token',
      sessionExpiredStatusCode: 440
    })
  • Moere

    Moere

    1 year ago
    yes
  • r

    rp

    1 year ago
    for
    fetch
    calling the
    init
    function should add the interceptors. For
    axios
    , you will have to call the
    supertokens.makeSuper(yourAxiosInstance)
  • Moere

    Moere

    1 year ago
    and the interceptor is added with the makeSuper