# React Native open web page in WebView

**URL:** <https://community.auth0.com/t/react-native-open-web-page-in-webview/119920>\
**Category:** Get Help\
**Tags:** authentication-sessions, sessions\
**Created:** [November 1, 2023, 4:18am UTC](https://community.auth0.com/t/react-native-open-web-page-in-webview/119920 "2023-11-01T04:18:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![apple8blossom8](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/apple8blossom8/32/51764_2.png) [@apple8blossom8](https://community.auth0.com/u/apple8blossom8)\
**Post date:** [November 1, 2023, 4:18am UTC](https://community.auth0.com/t/react-native-open-web-page-in-webview/119920/1 "2023-11-01T04:18:18Z")

</div>

I’m developing an Android application that is a cut version of our main (web) app. I need to redirect user to the main app using a link and I want to do it with the help of WebView so user can do everything in the same window. I tried the following approach and I only see Auth0 login page

```auto
  return (
      <WebView
        source={{
          uri: url, headers: {
            "Authorization": `Bearer ${TOKEN}`,
          },
        }}
      />
  );

```

What is the correct way to do it?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [November 6, 2023, 5:26pm UTC](https://community.auth0.com/t/react-native-open-web-page-in-webview/119920/3 "2023-11-06T17:26:55Z")

</div>

Hi @apple8blossom8,

What are you trying to do with this this request? I see you are sending a token to a URL in a web view, but I’m not sure what you are expecting to see in response.

Could you give us a bit more context?

---

<div class="post-metadata">

**Author:** ![apple8blossom8](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/apple8blossom8/32/51764_2.png) [@apple8blossom8](https://community.auth0.com/u/apple8blossom8)\
**Post date:** [November 7, 2023, 9:04pm UTC](https://community.auth0.com/t/react-native-open-web-page-in-webview/119920/4 "2023-11-07T21:04:05Z")

</div>

I want to open web application page in WebView in my mobile app. The web application shares the same Auth0 credentials so I want to pass token as a header so user will not need to authorize twice

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [November 8, 2023, 2:47pm UTC](https://community.auth0.com/t/react-native-open-web-page-in-webview/119920/5 "2023-11-08T14:47:40Z")

</div>

A web application and a mobile application should be treated as separate apps/clients, but can share an SSO session via a cookie if the login occurs in the same browser.

Are you using universal login for both apps? If so, your SSO session should work automatically.

---

<div class="post-metadata">

**Author:** ![apple8blossom8](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/apple8blossom8/32/51764_2.png) [@apple8blossom8](https://community.auth0.com/u/apple8blossom8)\
**Post date:** [November 8, 2023, 9:01pm UTC](https://community.auth0.com/t/react-native-open-web-page-in-webview/119920/6 "2023-11-08T21:01:18Z")

</div>

> [@dan.woda](#):
>
> but can share an SSO session via a cookie if the login occurs in the same browser.

Did I get it right, it is not possible to open link as WebView?

If I add the link like a regular one it opens in browser with user authorized, but this is not what I want

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [November 28, 2023, 3:19pm UTC](https://community.auth0.com/t/react-native-open-web-page-in-webview/119920/7 "2023-11-28T15:19:58Z")

</div>

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