how to set JWT in the local storage of a WebView

My app has 2 different realms, one native and one inside a WebView.
The user is logged in the native side and I keep the JWT token is stored in a SecureStorage.
At some point the user crosses from the native world to the Web world and in order to be logged in the web realm I have to set the localStorage with the JWT token I got in the native side.

How would you do this?

Thanks!

Hey @inavarro75,

If you are using RN’s WebView, you can use the injectedJavascript prop to inject the JWT token into the WebView’s realm.

Cheers,

Adam

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.