Skip to content
New issue

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

fix(middleware): handle no argument case #3799

Merged
merged 3 commits into from
Feb 3, 2022
Merged

Conversation

balazsorban44
Copy link
Member

@balazsorban44 balazsorban44 commented Feb 3, 2022

export { default } from "next-auth/middleware

and

import withAuth from "next-auth/middleware"
export default withAuth()

cases were broken.

Also changed to using absolute URLs when redirecting.

Reasoning 💡

Checklist 🧢

  • Documentation
  • Tests
  • Ready to be merged

Affected issues 🎟

@github-actions github-actions bot added the core Refers to `@auth/core` label Feb 3, 2022
@balazsorban44 balazsorban44 temporarily deployed to Preview February 3, 2022 23:22 Inactive
@codecov-commenter
Copy link

Codecov Report

Merging #3799 (cabc08c) into main (f3be5e8) will not change coverage.
The diff coverage is 0.00%.

❗ Current head cabc08c differs from pull request most recent head b451943. Consider uploading reports for the commit b451943 to get more accurate results

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3799   +/-   ##
=======================================
  Coverage   12.70%   12.70%           
=======================================
  Files          94       94           
  Lines        1496     1496           
  Branches      400      400           
=======================================
  Hits          190      190           
  Misses       1295     1295           
  Partials       11       11           
Impacted Files Coverage Δ
src/next/middleware.ts 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f3be5e8...b451943. Read the comment docs.

@balazsorban44 balazsorban44 merged commit f7fc562 into main Feb 3, 2022
@balazsorban44 balazsorban44 deleted the fix/middleware-no-arg branch February 3, 2022 23:27
@github-actions
Copy link

github-actions bot commented Feb 3, 2022

🎉 Experimental release published on npm!

npm i next-auth@0.0.0-pr.3799.b9241d4a
yarn add next-auth@0.0.0-pr.3799.b9241d4a

mnphpexpert added a commit to mnphpexpert/next-auth that referenced this pull request Sep 2, 2024
* fix(middleware): handle no argument case

* use absolute URLs

* use origin instead of host
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Refers to `@auth/core`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants