Title: Graceful degradation when Web Crypto is missing (old WebView / non-secure context) — cryptic crypto.randomUUID crash · Issue #10 · JavaScriptSolidServer/solid-oidc · GitHub
Open Graph Title: Graceful degradation when Web Crypto is missing (old WebView / non-secure context) — cryptic crypto.randomUUID crash · Issue #10 · JavaScriptSolidServer/solid-oidc
X Title: Graceful degradation when Web Crypto is missing (old WebView / non-secure context) — cryptic crypto.randomUUID crash · Issue #10 · JavaScriptSolidServer/solid-oidc
Description: Problem solid-oidc requires modern Web Crypto: crypto.randomUUID (state/nonce/PKCE verifier) and crypto.subtle (SHA-256 digest for the PKCE code_challenge, plus DPoP key-gen/sign). Both are gated to Chromium 92+ and secure contexts. On b...
Open Graph Description: Problem solid-oidc requires modern Web Crypto: crypto.randomUUID (state/nonce/PKCE verifier) and crypto.subtle (SHA-256 digest for the PKCE code_challenge, plus DPoP key-gen/sign). Both are gated t...
X Description: Problem solid-oidc requires modern Web Crypto: crypto.randomUUID (state/nonce/PKCE verifier) and crypto.subtle (SHA-256 digest for the PKCE code_challenge, plus DPoP key-gen/sign). Both are gated t...
Opengraph URL: https://github.com/JavaScriptSolidServer/solid-oidc/issues/10
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Graceful degradation when Web Crypto is missing (old WebView / non-secure context) — cryptic crypto.randomUUID crash","articleBody":"## Problem\n\nsolid-oidc requires modern Web Crypto: **`crypto.randomUUID`** (state/nonce/PKCE verifier) and **`crypto.subtle`** (SHA-256 `digest` for the PKCE `code_challenge`, plus DPoP key-gen/sign). Both are gated to **Chromium 92+ *and* secure contexts**.\n\nOn browsers that lack them, sign-in dies at the *first* call with a cryptic:\n\n```\ncrypto.randomUUID is not a function\n```\n\n…with no hint of the real cause. Two common situations hit this:\n\n1. **De-Googled Android phones** (LineageOS/pmOS without GApps) — the **Android System WebView is stale** because it normally updates via the Play Store, which isn't installed. So the default browsing surface can be an old Chromium lacking `randomUUID`/`subtle`.\n2. **Non-secure contexts** — a pod accessed over `http://\u003clan-ip>:port` (not `localhost`, not HTTPS) → `crypto.subtle`/`randomUUID` are `undefined` even on a modern browser.\n\nThis is the path made strict by #5 (jose → Web Crypto) — great for zero-deps, but it now hard-requires modern + secure-context crypto, and fails opaquely when that's absent.\n\n## Repro\n\nOpen a jspod/xlogin sign-in (which imports `solid-oidc`) on a de-Googled phone's stale WebView, or any pre-Chromium-92 / non-secure context → `crypto.randomUUID is not a function`.\n\n## Asks\n\n1. **Polyfill `crypto.randomUUID`** via `crypto.getRandomValues` (widely supported, *not* secure-context-gated) so the lib clears the first hurdle.\n2. **Detect missing `crypto.subtle` up front** and throw a **clear, actionable error**, e.g.:\n > solid-oidc requires Web Crypto (`crypto.subtle`); this browser/context doesn't provide it. Use an up-to-date browser over HTTPS or `localhost`.\n\n …instead of a cryptic mid-flow `randomUUID` crash.\n3. *(Optional)* a JS SHA-256 fallback for the PKCE `code_challenge` so PKCE survives without `subtle` — **but DPoP (ECDSA key-gen/sign) genuinely needs `crypto.subtle`**, so this can't fully run on a browser that lacks it. The realistic win is (1) + (2): a clear \"update your browser\" message, not a magic fix.\n\n## Impact\n\nAffects jspod onboarding sign-in, **xlogin**, and every app that authenticates via solid-oidc — especially the **Solid-Pod-on-a-de-Googled-phone** use case. Turning an opaque crash into \"your browser is too old / use HTTPS or localhost\" is the main improvement.\n\n## Related\n#5 (jose → Web Crypto). Same family as the secure-context / stale-WebView constraints on de-Googled devices.","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-05-26T16:25:56Z","url":"https://github.com/JavaScriptSolidServer/solid-oidc/issues/10"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:f00cdd83-83b0-7a38-bd05-6401530e4ce4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CE04:28DAC6:12C99A5:17C383D:6B03A2C1 |
| html-safe-nonce | 8b3d12160143db8a7d78b55da5743a3f8c76cb10db222eecfb5eb01e2ce13ca8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTA0OjI4REFDNjoxMkM5OUE1OjE3QzM4M0Q6NkIwM0EyQzEiLCJ2aXNpdG9yX2lkIjoiNjQ5OTU2MDI4ODQxMTY4OTY2NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 22e219118f14a0d077f9a5bf59c0ebab61e3ca41d0eef879a7aae342dc4abe13 |
| hovercard-subject-tag | issue:4525779127 |
| 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/JavaScriptSolidServer/solid-oidc/10/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e6b97c1b2ea70f8f8089b12f8ffad3e1058ab2f673f227300774721130db822a/JavaScriptSolidServer/solid-oidc/issues/10 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e6b97c1b2ea70f8f8089b12f8ffad3e1058ab2f673f227300774721130db822a/JavaScriptSolidServer/solid-oidc/issues/10 |
| og:image:alt | Problem solid-oidc requires modern Web Crypto: crypto.randomUUID (state/nonce/PKCE verifier) and crypto.subtle (SHA-256 digest for the PKCE code_challenge, plus DPoP key-gen/sign). Both are gated t... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/solid-oidc git https://github.com/JavaScriptSolidServer/solid-oidc.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 1125114140 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/solid-oidc |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1125114140 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/solid-oidc |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width