client won't run under `edge` runtime
muradm opened this issue · comments
Murad commented
Describe the bug
oidc-token-hash
is not compatible with edge
runtime:
- uses
process.version
causes below error - uses
crypto.getHashes()...
which would fail as well
- error node_modules/oidc-token-hash/lib/shake256.js (3:0) @ <unknown>
- error Cannot read properties of undefined (reading 'substring'
To Reproduce
npx create-next-app@latest ...
npm i -S openid-client
import { Issuer } from 'openid-client'
await Issuer.discover('...')
npm run dev
Error happens at import time, does not even proceed to service handling time.
Expected behaviour
Should normally work as documented under edge
environment.
Environment:
- openid-client version: v5.4.2
- next version: v13.4.5
- node version: v18.16.0
Filip Skokan commented
It is not intended for any other runtime than node. https://github.com/panva/oauth4webapi on the other hand is for such runtimes.