I have a login screen in the react-native mobile app. When a user enters the correct Email and password, then I store the jwt token in the react-native app, but not in the webview. After the login screen, I want to show a webview(Dashboard). How to skip the login screen because the user is already authenticated in react-native-app? How to pass the jwt token to webview so that the user does not need authentication again. Click to see code
            Asked
            
        
        
            Active
            
        
            Viewed 602 times
        
    1 Answers
0
            You can pass the token with the URL in the WebView component with query param:
const myToken="1234";
// rest of the codes ...
source={{uri: `https://prelive-crm.new.pabau.com/clients?app=1&token=${myToken}`}}
Note: the maximum possible length of the query string is 2048 characters. read more on this post.
Note: You need to get the token param within your website.
 
    
    
        nima
        
- 7,796
- 12
- 36
- 53
 
    