Preliminary Checks
Reproduction
webview opens as unauthenticated in mobile
Publishable key
pk_test_bmF0aXZlLWNvdy01NS5jbGVyay5hY2NvdW50cy5kZXYk
Description
I am working on an Expo app and using Clerk for authentication. I need to open a web view in the mobile app, but the authentication state should be passed from mobile to the web component opened on the web view (Web is Remix). I attempted it like this:
source={{ uri: url, headers: {
Authorization: `Bearer ${token}`
}}}
sharedCookiesEnabled={true}
But, I am not able to have a successful navigation, since I am unauthenticated when web view is opened. The value
token comes from the getToken of useAuth that I imported from @clerk/clerk-expo"
.
I also tried using it like this:
source={{ uri: url, headers: {
Cookies: `${token}`
}}}
sharedCookiesEnabled={true}
As a last effort, I tried copying the whole
cookies
body from the script in the network tag from my web app and pasting to the
Cookies
parameter above, but it was not successful. Here is the structure of that value:
__clerk_db_jwt=...;
__clerk_db_jwt_2fyn-cby=...;
__client_uat_2fyn-cby=...;
__client_uat=...;
__session_2fyn-cby=...;
__session=...;
}
This looks like an issue with Clerk, since I suppose that opening a webview as authenticated should be possible.
Environment
System:
OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)
CPU: (8) x64 Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz
Memory: 3.36 GB / 15.48 GB
Container: Yes
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
pnpm: 9.1.0 - ~/.nvm/versions/node/v20.11.0/bin/pnpm
Browsers:
Chrome: 102.0.5005.115
Preliminary Checks
I have reviewed the documentation: https://clerk.com/docs
I have searched for existing issues: https://github.com/clerk/javascript/issues
I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Reproduction
webview opens as unauthenticated in mobile
Publishable key
pk_test_bmF0aXZlLWNvdy01NS5jbGVyay5hY2NvdW50cy5kZXYk
Description
I am working on an Expo app and using Clerk for authentication. I need to open a web view in the mobile app, but the authentication state should be passed from mobile to the web component opened on the web view (Web is Remix). I attempted it like this:
But, I am not able to have a successful navigation, since I am unauthenticated when web view is opened. The value
token comes from the getToken of useAuth that I imported from @clerk/clerk-expo"
.
I also tried using it like this:
As a last effort, I tried copying the whole
cookies
body from the script in the network tag from my web app and pasting to the
Cookies
parameter above, but it was not successful. Here is the structure of that value:
This looks like an issue with Clerk, since I suppose that opening a webview as authenticated should be possible.
Environment
System: OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa) CPU: (8) x64 Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz Memory: 3.36 GB / 15.48 GB Container: Yes Shell: 5.0.17 - /bin/bash Binaries: Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm pnpm: 9.1.0 - ~/.nvm/versions/node/v20.11.0/bin/pnpm Browsers: Chrome: 102.0.5005.115