joeldesante

    joeldesante

    5 months ago
    Any ideas?
    r

    rp

    5 months ago
    Any ideas?
    Hey!
    Use this thread @User @User
    joeldesante

    joeldesante

    5 months ago
    Ive been manually hitting endpoints through the browser
    n

    nkshah2

    5 months ago
    Just to clarify, you’ve hosted the SuperTokens core yourself but haven’t used any backend sdk yet?
    r

    rp

    5 months ago
    Are you querying your frontend url or backend url?
    Not sure what you mean by that
    Im querying supertokens directly right now
    r

    rp

    5 months ago
    The core?
    Please see the architecture diagram
    joeldesante

    joeldesante

    5 months ago
    One moment, let me take a look
    r

    rp

    5 months ago
    And setup the frontend / backend SDKs
    There are two sets of APIs
    One for the core, and one exposed by the backend SDK
    joeldesante

    joeldesante

    5 months ago
    Right so
    Im trying to ping the bottom part there
    r

    rp

    5 months ago
    Not sure what you mean by bottom
    Left or right?
    joeldesante

    joeldesante

    5 months ago
    the second one in the "Your Backend API" section
    the lower one
    n

    nkshah2

    5 months ago
    So there’s three parts to using SuperTokens, you need the core which you have hosted yourself
    joeldesante

    joeldesante

    5 months ago
    right
    n

    nkshah2

    5 months ago
    You need the backend sdk that exposes the APIs to you
    Which is the middle bit you’re trying to query
    joeldesante

    joeldesante

    5 months ago
    So the SDK is what lets me programmatically access supertokens. RIght?
    n

    nkshah2

    5 months ago
    And exposes api routes on your server (to call things like /auth/signin etc)
    joeldesante

    joeldesante

    5 months ago
    Right, but why cant I just make a request to the core directly?
    It's just a rest api right?
    n

    nkshah2

    5 months ago
    joeldesante

    joeldesante

    5 months ago
    Right now Im using the Signin/Signup recipe and Im getting 404s with that too
    n

    nkshah2

    5 months ago
    That’s the spec for APIs exposed by the core, if you wanted to call it manually
    joeldesante

    joeldesante

    5 months ago
    Yea, so Im looking at that and Im getting 404's
    n

    nkshah2

    5 months ago
    The URL you sent earlier doesn’t match the spec
    joeldesante

    joeldesante

    5 months ago
    That may be the issue. Let me relook at that
    n

    nkshah2

    5 months ago
    Also while you can query the core directly, I highly recommend using one of the backend sdks. It makes the whole process much simpler
    joeldesante

    joeldesante

    5 months ago
    Right, thats the plan
    n

    nkshah2

    5 months ago
    But for testing you can use that spec
    joeldesante

    joeldesante

    5 months ago
    But I need to figure out why its not responding with anything
    I looked at the spec. Seems to match
    How would you change it to match?
    n

    nkshah2

    5 months ago
    Right so that’s a different spec
    That’s the spec for the frontend to query the backend sdk
    The one I sent is the spec for communicating with the core
    If you look at both, the routes are different
    joeldesante

    joeldesante

    5 months ago
    Oml. Okay so I clicked the link you gave me and Im getting responses now.
    Thats a bit confusing
    n

    nkshah2

    5 months ago
    Like I said there’s 3 parts to SuperTokens in most cases, so 2 specs for the two pairs
    joeldesante

    joeldesante

    5 months ago
    So then I guess what I dont understand is what is the frontend doing? Because it is querying something and getting 404s
    I clearly misconfigured something
    n

    nkshah2

    5 months ago
    So you hosted the core, which your backend communicates with
    joeldesante

    joeldesante

    5 months ago
    So there are 3 restful API's?
    or 3 parts generally
    n

    nkshah2

    5 months ago
    3 parts but 2 sets of APIs- between your backend and the core (the one I sent) - between the frontend and the backend (the one you sent)
    joeldesante

    joeldesante

    5 months ago
    Ah okay. I see
    Why was it designed this way? Just curious.
    n

    nkshah2

    5 months ago
    Out of curiosity what part of the architecture diagram confused you in this setup? So we can improve on it
    joeldesante

    joeldesante

    5 months ago
    If Im being honest, the documentation overall was really unclear
    n

    nkshah2

    5 months ago
    Hmm, we would love to hear some specifics. I do agree things can be improved but hard to do that without feedback 😛
    joeldesante

    joeldesante

    5 months ago
    message has been deleted
    In this image it isnt clear what is happening to me.
    All im seeing is that there are some endpoints
    r

    rp

    5 months ago
    Did you see the diagram below?
    And walk through how that works?
    joeldesante

    joeldesante

    5 months ago
    The sign in and sign out flow?
    r

    rp

    5 months ago
    Yes
    joeldesante

    joeldesante

    5 months ago
    I havnt even looked at it yet.
    I didnt realize that I should have looked at it
    r

    rp

    5 months ago
    Hmm.
    n

    nkshah2

    5 months ago
    Yep that’s probably where the confusion comes from, something we need to iterate on for sure then
    Thanks for the feedback!
    joeldesante

    joeldesante

    5 months ago
    So after looking at the second chat. The system makes more sense. But Im confused, what exactly is a "session" in this case?
    I assume it's different from sessions in PHP?
    n

    nkshah2

    5 months ago
    It’s just a conventional session, the best way to look at it is that your backend systems are split into the backend sdk and the core
    joeldesante

    joeldesante

    5 months ago
    Right, so the whole system is stateless then?
    holly molly
    it works
    thanks!
    r

    rp

    5 months ago
    Yes. It is.