Closed muradm closed 1 year ago
Describe the bug oidc-token-hash is not compatible with edge runtime:
oidc-token-hash
edge
process.version
crypto.getHashes()...
- 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:
It is not intended for any other runtime than node. https://github.com/panva/oauth4webapi on the other hand is for such runtimes.
https://github.com/panva/openid-client/releases/tag/v6.0.0
Describe the bug
oidc-token-hash
is not compatible withedge
runtime:process.version
causes below errorcrypto.getHashes()...
which would fail as wellTo Reproduce
Error happens at import time, does not even proceed to service handling time.
Expected behaviour Should normally work as documented under
edge
environment.Environment: