• r

    rp

    2 years ago
    Then requests to /auth/* will start working (via the SuperTokens middleware), since a session exists
  • r

    rp

    2 years ago
    In ur existing middleware, u can check if the path === ur login API’s path, then don’t call getSession, instead just call next(). And in your login API, u can call createNewSession
  • bustEXZ

    bustEXZ

    2 years ago
    hm, thanks, i try
  • r

    rp

    2 years ago
    Also, keep in mind that the getSession May also throw a TRY_REFRESH_TOKEN error. Which needs to be handled separately.
  • bustEXZ

    bustEXZ

    2 years ago
    another question with SSR and supertoken-website
  • bustEXZ

    bustEXZ

    2 years ago
    now i create my own fetcher with cookie sender from client -> server and server request to server by url with auth info
  • bustEXZ

    bustEXZ

    2 years ago
    is it correct, or you now best solution for this?
  • bustEXZ

    bustEXZ

    2 years ago
    supertoken-website/fetch|axios works only on Frontend
  • r

    rp

    2 years ago
    I'm not sure I understand your question. Can you please reiterate it in clearer terms?
  • bustEXZ

    bustEXZ

    2 years ago
    sorry for my bad english, moment)