an0th3rhuman

    an0th3rhuman

    4 months ago
    Hi team, Do we have supertokens docs for flutter SDK?
    n

    nkshah2

    4 months ago
    Hi, Unfortunately we don’t, but if you have questions we can answer them here
    wdjzr

    wdjzr

    4 months ago
    Is it completely deprecated?
    Hello @nkshah2, I just searched the discord chat history and found this message of you
    Does this mean the public library is still good for using it in mobile flutter apps?
    I mean, I understand there are no UI etc, but I can build the login page and that is all I need for my app. Verifying sessions, refreshing access tokens etc still would work correctly?
    n

    nkshah2

    4 months ago
    If you plan on using http then yes the sdk can still be used with network interception. It does not support dio and other network implementations though
    wdjzr

    wdjzr

    4 months ago
    Thanks for the input! I wasnt planning to use DIO but how is it different from network interception with http?
    We have used our own auth implementation in the past and we would use mutex for releasing and locking access / refresh tokens and we would pass the bearer token to our manual DI container (which uses HTTP calls)
    As far as I can tell, we can build the same pattern with supertokens, right?
    n

    nkshah2

    4 months ago
    http
    expects you to create a wrapper and then override specific functions to handle adding custom headers, handling auto refreshing etc
    Dio
    has an easier API for adding request and response interceptors. It works similar to how okhttp handles chaining if you are familiar with that (if not just imagine a chain of operations taking place before/after the actual network handler runs its code, depending on whether its a request or response). They handle responses differently, errors differently and have a different API when compared to http so the same solution doesnt really work for both
    Its more of an interface problem than logic problem, we just havent ported our solution to dio yet
    Also to answer your question, SuperTokens primarily uses cookies as a way to handle auth. You can also use JWTs as bearer tokens when using SuperTokens so yes it is the same pattern
    wdjzr

    wdjzr

    4 months ago
    Ahh, okay, thanks for your explanations! πŸ˜‡ Good enough for me to start tinkering and I ll see results πŸ˜›
    n

    nkshah2

    4 months ago
    Happy to help