honojs / middleware

monorepo for Hono third-party middleware/helpers/wrappers
https://hono.dev
473 stars 169 forks source link

fix(auth-js): fix cloned request causing request body to be unavailab… #806

Closed 985563349 closed 2 weeks ago

985563349 commented 2 weeks ago

I fixed some issues and found that auth-js, when used with zod-validator, would throw: malformed JSON in the request body.

The reason for this is that after cloning the request, the request body is not available in hono/validator via c.req.json.

changeset-bot[bot] commented 2 weeks ago

🦋 Changeset detected

Latest commit: 24552b85fa7836fb7ab211b39b819428c65f86e7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------------- | ----- | | @hono/auth-js | Major |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

yusukebe commented 2 weeks ago

@985563349 Thanks!

@divyam234 Can you review this, if you have a time.

divyam234 commented 2 weeks ago

LGTM

yusukebe commented 2 weeks ago

@985563349 @divyam234 Thanks! Let's go with this.