Hi, I joined Slack to see if somebody else has ever tried to integrate Kratos with Ionic/Capacitor. Since Ionic apps are basically SPAs but rendered in a webview within a native context, I’m not sure if I should use cookies (browser approach) or tokens (native app approach) to handle self-service flows.
Here’s the paradox I am not able to solve:
1. I cannot use browser flows since my app is always served locally (
http://localhost on Android,
capacitor://localhost on iOS) and so will not be able to share cookies with Ory, no matter where it is hosted.
2. I cannot use API flows because Ory client prevents me from using them in a browser-like context, to avoid CSRF vulnerabilities.
About 1., I think that’s impossible to achieve. About 2., maybe sending native HTTP requests would solve the issue, but I don’t know if that’s the right approach honestly…