Hello everyone, did any got some success running ...
# support-questions-legacy
m
Hello everyone, did any got some success running Supertokens on Quasar/Capacitor for both Web, Ios, Android device? we are close to get there but just one bug remain .. We got inspiration from the VueJS example and the React/Electron example provided. It works on Web, IOS device but for Android, after successfull authentication, we get an 401 error if we try to call the API
r
hey!
Can you enable backend debug logs and show me the output when you call an API from the android device (post login)
@marchalb
@marchalb let's talk in this thread.
the logs you sent are of the frontend - can you generat the backend debug logs and show me as well?
m
ok thanks let's me get the logs
after successfull loging I get this screen
I press Call API
here you are .. frontend and backend log are in the file
r
alright! so the android device is not sending cookies. Thats the problem.
m
sending cookies to ? which cookies?
r
the backend
m
I which part of the source code there is a problem?
r
i think there is another thread on discord here about this same issue with capacitor. Let me try and find that
m
yes we use Capacitor
by the way we use the custom cookie handler (see example React/Electron) .. it solved our problem with ios but not android
r
got it
if the above doesn't help, let me know
m
I wll definitely investigate . the post links to this: https://supertokens.com/docs/thirdpartyemailpassword/advanced-customizations/examples/localstorage/about Which indicates that some works is also necessary on the server side .. (I did not do it yet .. ) .. Many thanks
r
okay! that link basically shows you how to switch to using headers and localstroage instead of using cookies.
m
Could that be the source of our problem? https://github.com/ionic-team/capacitor/issues/5394 There is a bug on Capacitor/android: when several cookies are set, only the last one is taken into effect The bug might be soon be fixed
r
Yea. Quite possibly. But can only confirm once we know which cookie is set
But this will definitely cause things to break
So maybe you should switch to using headers instead following that doc link above
m
I try it, it is not that simple and there are some drawback from the security point of view as pointed in your good document. I will wait a bit for now to see if the promised Capacitor fix solve the issue. We leave Android for now . Thanks again
r
Okay!
4 Views