We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The request body is empty in Strategy.authenticate() when using bun as runtime.
In src/authenticator.ts a new Request is created but the body is not cloned in bun.
src/authenticator.ts
new Request(request.url, request),
It is a know bug in bun issue, but is not getting fixed soon.
A option to disable cloning the request would fix the issue for me.
none
use bun
A option to disable cloning the request
No response
to fix the issue for me i have to override the authenticate method without cloning the request
function authenticate( this: any, strategy: string, request: Request, options: Pick< AuthenticateOptions, "successRedirect" | "failureRedirect" | "throwOnError" | "context" > = {} ): Promise<User> { const strategyObj = this.strategies.get(strategy); if (!strategyObj) throw new Error(`Strategy ${strategy} not found.`); return strategyObj.authenticate(request, this.sessionStorage, { throwOnError: this.throwOnError, ...options, name: strategy, sessionKey: this.sessionKey, sessionErrorKey: this.sessionErrorKey, sessionStrategyKey: this.sessionStrategyKey, }); } // @ts-expect-error authenticator.authenticate = authenticate.bind(authenticator);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
The request body is empty in Strategy.authenticate() when using bun as runtime.
In
src/authenticator.ts
a new Request is created but the body is not cloned in bun.It is a know bug in bun issue, but is not getting fixed soon.
A option to disable cloning the request would fix the issue for me.
Your Example Website or App
none
Steps to Reproduce the Bug or Issue
use bun
Expected behavior
A option to disable cloning the request
Screenshots or Videos
No response
Platform
Additional context
to fix the issue for me i have to override the authenticate method without cloning the request
The text was updated successfully, but these errors were encountered: