Open
Description
Specify your setup
- Operating System: Linux Debian 12 Buster X86_64
- Node version: Bun 1.2.15
- npm version: Bun 1.2.15
- version of @node-oauth/oauth2-server: 5.2.0
Describe the bug
The oauth2-server.Request is not compatible to Fetch API Request, "Missing parameter: query
"
To Reproduce
Steps to reproduce the behavior:
- use a framework like SvelteKit that uses Fetch API Requests
- build a request handler that passes down Request to oauth2server
- See error:
invalid_argument: Missing parameter: `query`
statusCode: 500,
status: 500,
code: 500,
at new OAuthError (/app/node_modules/@node-oauth/oauth2-server/lib/errors/oauth-error.js:13:5)
at new InvalidArgumentError (/app/node_modules/@node-oauth/oauth2-server/lib/errors/invalid-argument-error.js:21:5)
at new Request (/app/node_modules/@node-oauth/oauth2-server/lib/request.js:21:13)
Expected behavior
Try to get query via request.url (e.g.: new URL(request.url).searchParams
Screenshots
Additional context
In the examples (e.g. express server) requests are passed down to the oauth server. While express is probably the most used framework, I don't see why the default Request shouldn't be supported.
Metadata
Metadata
Assignees
Labels
No labels