Hi team, Do we have supertokens docs for flutter S...
# general
a
Hi team, Do we have supertokens docs for flutter SDK?
n
Hi, Unfortunately we don’t, but if you have questions we can answer them here
w
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
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
w
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
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
w
Ahh, okay, thanks for your explanations! πŸ˜‡ Good enough for me to start tinkering and I ll see results πŸ˜›
n
Happy to help
Hey @wdjzr @an0th3rhuman I know this is a really old thread, but just wanted to revive it to let you guys know we have an official flutter SDK now! https://pub.dev/packages/supertokens_flutter
255 Views