1

using some basic code, I am trying to access a sharepoint page:

import { WebView } from 'react-native-webview'

const ExampleScreen = ({ navigation }) => {
    return (
        <WebView style={{flex: 1}} 
        source={{uri: 'https://example.intra.net/sites/1/ProjectName/SitePages/Nameofpage.aspx'}}/>
    )
}

export default ExampleScreen;

When I pull up the page on Safari, I can see it, because I'm logged in. However when I try to look at the page in the Expo Go test build, it says "401 Unauthorized". What is the process for authenticating something like this in a native app? I am a novice and I don't understand how it works.

Wendigo
  • 63
  • 1
  • 3
  • Does this answer your question? https://stackoverflow.com/questions/34181194/custom-http-headers-for-webview-requests . You can look at your network requests on the page via the console in Safari to get a token to test with. To use your RN app to log in, inspect the network requests the browser makes when you log in on the web. – Abe Mar 04 '22 at 05:57

0 Answers0