a

    alisha

    4 months ago
    hey, I am facing this error while calling /signout API
    r

    rp

    4 months ago
    hey!
    what's the error?
    a

    alisha

    4 months ago
    {
      "message": "try refresh token"
    }
    r

    rp

    4 months ago
    can you enable debug logs and show me the output?
    Also, how are you calling the sign out API? via postman / frontend app?
    a

    alisha

    4 months ago
    via postman
    r

    rp

    4 months ago
    right. So this error means the access token has expired
    a

    alisha

    4 months ago
    com.supertokens {t: "2022-05-26T15:55:15+05:30", message: "getSession: Returning try refresh token because access token from cookies is nil", file: "/home/alishavirani/go/pkg/mod/github.com/supertokens/supertokens-golang@v0.6.2/recipe/session/api/implementation.go:54" sdkVer: "0.6.2"}
    r

    rp

    4 months ago
    so you need to refresh the access token and then call this API again
    so you need to refresh the access token and then call this API again
    a

    alisha

    4 months ago
    curl --location --request POST 'http://localhost:9000/auth/v1/signout' \
    --header 'Cookie: sIdRefreshToken=f2ced83c-3aaa-4e0e-b9e1-769d4dc0fe67'
    r

    rp

    4 months ago
    You also need to add the access token to the request
    which you can get if you call the refresh API with the refresh token
    a

    alisha

    4 months ago
    oh ok, trying
    r

    rp

    4 months ago
    on the frontend, the refresh would have happened automatically.
    Since you are using postman, you need to do it manually
    a

    alisha

    4 months ago
    worked - thanks 🙂