panva / openid-client

OAuth 2 / OpenID Connect Client API for JavaScript Runtimes
MIT License
1.83k stars 392 forks source link

client won't run under `edge` runtime #606

Closed muradm closed 1 year ago

muradm commented 1 year ago

Describe the bug oidc-token-hash is not compatible with edge runtime:

- 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:

panva commented 1 year ago

It is not intended for any other runtime than node. https://github.com/panva/oauth4webapi on the other hand is for such runtimes.

panva commented 6 days ago

https://github.com/panva/openid-client/releases/tag/v6.0.0