Skip to content

fix: detect origin when instanceof Request check fails#7303

Merged
balazsorban44 merged 1 commit intomainfrom
fix/workaround-instanceof-request
Apr 18, 2023
Merged

fix: detect origin when instanceof Request check fails#7303
balazsorban44 merged 1 commit intomainfrom
fix/workaround-instanceof-request

Conversation

@balazsorban44
Copy link
Copy Markdown
Member

@balazsorban44 balazsorban44 commented Apr 18, 2023

Fixes #7229

The instanceof Request should return true in Next.js, but it does not in some cases. This workaround is shipped for now to unblock the users. Ultimately this should be fixed upstream in Next.js

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Ignored Deployments
Name Status Preview Updated (UTC)
auth-docs ⬜️ Ignored (Inspect) Apr 18, 2023 4:31pm
auth-docs-nextra ⬜️ Ignored (Inspect) Apr 18, 2023 4:31pm
next-auth-docs ⬜️ Ignored (Inspect) Apr 18, 2023 4:31pm

@github-actions github-actions bot added the legacy Refers to `next-auth` v4. Minimal maintenance. label Apr 18, 2023
@balazsorban44 balazsorban44 marked this pull request as ready for review April 18, 2023 16:46
@balazsorban44 balazsorban44 merged commit 6f9ca41 into main Apr 18, 2023
@balazsorban44 balazsorban44 deleted the fix/workaround-instanceof-request branch April 18, 2023 16:46
balazsorban44 added a commit that referenced this pull request May 4, 2023
* docs: Remove --save from install command (#7277)

Remove --save from install command

--save is no longer needed on npm install.

* chore: fix "Contributing guide" link (#7279)

* fix: detect origin when `instanceof Request` check fails (#7303)

* docs: Update Clerk sponsorship URL (#7305)

- Change Clerk URL from `https://clerk.dev` to `https://clerk.com`

- Fix alt from copy/paste

* chore: bump react types

* fix(docs): fix default `maxAge` formula (#7406)

* Update pnpm-lock.yaml

* sync package.json change

---------

Co-authored-by: Chris Hayes <6013871+Christopher-Hayes@users.noreply.github.com>
Co-authored-by: Raul <57044803+Leprekus@users.noreply.github.com>
Co-authored-by: Balázs Orbán <info@balazsorban.com>
Co-authored-by: Nick Parsons <nparsons08@gmail.com>
Co-authored-by: Victor <saptefrativictor@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

legacy Refers to `next-auth` v4. Minimal maintenance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deployment issue with Route Handler

1 participant