• Sun Walker

    Sun Walker

    2 years ago
    yeah got you!
  • r

    rp

    2 years ago
    I see. Yea so then u can get other’s userId through some search feature. And then send that to this API to get other user’s info
  • r

    rp

    2 years ago
    But for ur own info, u don’t need ur own userID, cause u have the access token. But I mean there are many ways to architect this. There is no “right” way as such.
  • r

    rp

    2 years ago
    @Sun Walker if you could also star our supertokens-core repo, that would be awesome!
  • Sun Walker

    Sun Walker

    2 years ago
    Yes, will do it now
  • r

    rp

    2 years ago
    👍
  • Sun Walker

    Sun Walker

    2 years ago
    if one hits /login endpoint multiple times, it makes multiple sessions in db, is this intended?
  • Sun Walker

    Sun Walker

    2 years ago
    also
    } else if (err.errType === supertokens.Error.UNAUTHORISED) {
                    // redirect to login page.
                } else {    // TRY_REFRESH_TOKEN
                    res.status(440).send("Please call the refresh token endpoint");
                }
    It says 'redirect to login page', what code do you need to write to do that? and 'TRY_REFRESH_TOKEN', <-- Does this mean we have to code that in or leave it as
    res.status(440).send("Please call the refresh token endpoint");
  • Sun Walker

    Sun Walker

    2 years ago
    Also If I want to test out my session middleware called 'superTokensMiddleware' in insomnia, or postman, how do I do this? what must I pass in my req (request)?
  • Sun Walker

    Sun Walker

    2 years ago
    it comes back with response 'please call refresh token' but I dont know what to pass it in insomnia (for testing)