User ID

Allow your mobile application to keep track of current logged in user ID, it might be useful when you try to re-login your user automatically by following the specified steps (Click Here to know the steps to re-login your users from backend)

Here’s an example

<script>
jQuery(function($){
    //Send user ID to mobile application
    var web_data = [{
        "type": "user_id",
        "data": "123",
    }];
    window.top.ReactNativeWebView?.postMessage(JSON.stringify(web_data));
});
</script>

TIPS
After your user logged out, you could send user_id = 0 to mobile application using the same method, so that our framework can identify that this user has been logged out.

Powered by BetterDocs