now how do we pass this session params to the unde...
# support-questions
m
now how do we pass this session params to the underlying cordova app? I am able to use
sFrontToken
and
sIRTFrontend
in crodova as I am able to read it as a callback in cordova
n
Hi
To clarify, you want to integrate the flow in a webview or do you mean on the native side of things?
m
webview, as that is the only feasible option in cordova sort of apps
n
And you want the tokens to be used in network calls made on the native side?
Just trying to understand the end goal
m
yes, exactly.
now since these are apps, having a automatic session extension feature by using refresh tokens is the end goal, as access tokens are short lived.
n
Right, the best way I can think of would be to check if there is a way for the Webview to use the same cookie store as the underlying native app (Not too familiar with Cordova but this is possible in normal webviews on both iOS and Android)
For the automatic refreshing bit you would need to integrate our mobile SDKs for the native network calls because the website SDK will only be able to do that for calls made in the webview
m
hmm
and by any chance you have SDK's for flutter?
n
Its two weeks out
m
ok, any plans for cordova plugin as well?
n
Just adding the final touches to it for http and dio support
In most cases the website SDK works fine with the JS side of cordova, there isnt a plan to support a full hybrid setup with it at the moment
As an alternative you could call functions on the JS side from native, and have the JS make the actual network call and return data to native. This isnt ideal but it would work
m
yeah, am thinking how I can constantly refresh the access tokens store in the background while the app is operating
I do know a hacky way... but was hoping I could avoid
n
Hmm yeah im not entirely sure of a clean solution for this either
One way I can think of is to set up shared cookies between native and webview like I mentioned before, then have the native side periodically call the refresh endpoint manually
m
hmm
let me try that, will come back to you on this