Title: WebView not opening Remix app webpage as authenticated when navigating from Expo app · Issue #3880 · clerk/javascript · GitHub
Open Graph Title: WebView not opening Remix app webpage as authenticated when navigating from Expo app · Issue #3880 · clerk/javascript
X Title: WebView not opening Remix app webpage as authenticated when navigating from Expo app · Issue #3880 · clerk/javascript
Description: 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 hav...
Open Graph Description: 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 ...
X Description: 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 ...
Opengraph URL: https://github.com/clerk/javascript/issues/3880
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"WebView not opening Remix app webpage as authenticated when navigating from Expo app","articleBody":"### Preliminary Checks\r\n\r\n- [X] I have reviewed the documentation: https://clerk.com/docs\r\n\r\n- [X] I have searched for existing issues: https://github.com/clerk/javascript/issues\r\n\r\n- [X] I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)\r\n\r\n- [X] 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.\r\n\r\n\r\n### Reproduction\r\n\r\nwebview opens as unauthenticated in mobile\r\n\r\n### Publishable key\r\n\r\npk_test_bmF0aXZlLWNvdy01NS5jbGVyay5hY2NvdW50cy5kZXYk\r\n\r\n### Description\r\n\r\nI 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:\r\n\r\n```\u003cWebView \r\n source={{ uri: url, headers: {\r\n Authorization: `Bearer ${token}`\r\n }}}\r\n sharedCookiesEnabled={true}\r\n```\r\n\r\n\r\nBut, I am not able to have a successful navigation, since I am unauthenticated when web view is opened. The value \r\ntoken comes from the getToken of useAuth that I imported from @clerk/clerk-expo\"\r\n.\r\n\r\nI also tried using it like this:\r\n\r\n\r\n```\u003cWebView \r\n source={{ uri: url, headers: {\r\n Cookies: `${token}`\r\n }}}\r\n sharedCookiesEnabled={true}\r\n```\r\n\r\n\r\nAs a last effort, I tried copying the whole \r\ncookies\r\n body from the script in the network tag from my web app and pasting to the \r\nCookies\r\n parameter above, but it was not successful. Here is the structure of that value:\r\n\r\n\r\n```cookies: {\r\n __clerk_db_jwt=...;\r\n __clerk_db_jwt_2fyn-cby=...; \r\n __client_uat_2fyn-cby=...; \r\n __client_uat=...; \r\n __session_2fyn-cby=...;\r\n __session=...;\r\n}\r\n```\r\n\r\n\r\n\r\nThis looks like an issue with Clerk, since I suppose that opening a webview as authenticated should be possible.\r\n\r\n### Environment\r\n\r\n```Shell\r\nSystem:\r\n OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)\r\n CPU: (8) x64 Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz\r\n Memory: 3.36 GB / 15.48 GB\r\n Container: Yes\r\n Shell: 5.0.17 - /bin/bash\r\n Binaries:\r\n Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node\r\n Yarn: 1.22.10 - /usr/local/bin/yarn\r\n npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm\r\n pnpm: 9.1.0 - ~/.nvm/versions/node/v20.11.0/bin/pnpm\r\n Browsers:\r\n Chrome: 102.0.5005.115\r\n```\r\n","author":{"url":"https://github.com/lramosaj","@type":"Person","name":"lramosaj"},"datePublished":"2024-08-01T20:15:58Z","url":"https://github.com/clerk/javascript/issues/3880"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:dcbb021d-3ab7-0dbf-8953-6e9fefd8851e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EDA4:2781FE:846018:B9FFB9:6AFB6DE3 |
| html-safe-nonce | e977121aed71f6a02cac9485c818de13d3ae6e2b087d81832a5cdcbd868cf1a0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFREE0OjI3ODFGRTo4NDYwMTg6QjlGRkI5OjZBRkI2REUzIiwidmlzaXRvcl9pZCI6IjcyNTYzNjcxMjEyMDA1NDExNTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9a718ed9816d652a2a31ec1df63e35ece82c59adf645335a4b10bfcbec193eb5 |
| hovercard-subject-tag | issue:2443335114 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/clerk/javascript/3880/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c0cc61597d0a7e5c9f2a1a0c4fd5003a5fe303748baa7a062dd10b73df1bfec1/clerk/javascript/issues/3880 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c0cc61597d0a7e5c9f2a1a0c4fd5003a5fe303748baa7a062dd10b73df1bfec1/clerk/javascript/issues/3880 |
| og:image:alt | 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 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lramosaj |
| hostname | github.com |
| expected-hostname | github.com |
| None | cca289ecd54650fcf3c0b037a58b97186dee2cc4406819d87fab93728fd83700 |
| turbo-cache-control | no-preview |
| go-import | github.com/clerk/javascript git https://github.com/clerk/javascript.git |
| octolytics-dimension-user_id | 49538330 |
| octolytics-dimension-user_login | clerk |
| octolytics-dimension-repository_id | 438331492 |
| octolytics-dimension-repository_nwo | clerk/javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 438331492 |
| octolytics-dimension-repository_network_root_nwo | clerk/javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 88808b1fae5ab8a526a73e7ce5542a10eb9d6971 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width