File tree Expand file tree Collapse file tree 6 files changed +866
-4
lines changed Expand file tree Collapse file tree 6 files changed +866
-4
lines changed Original file line number Diff line number Diff line change 1+ # Changesets
2+
3+ Hello and welcome! This folder has been automatically generated by ` @changesets/cli ` , a build tool that works
4+ with multi-package repos, or single-package repos to help you version and publish your code. You can
5+ find the full documentation for it [ in our repository] ( https://github.com/changesets/changesets )
6+
7+ We have a quick list of common questions to get you started engaging with this project in
8+ [ our documentation] ( https://github.com/changesets/changesets/blob/main/docs/common-questions.md )
Original file line number Diff line number Diff line change 1+ {
2+ "$schema" : " https://unpkg.com/@changesets/config@2.3.0/schema.json" ,
3+ "changelog" : " @changesets/cli/changelog" ,
4+ "commit" : false ,
5+ "fixed" : [],
6+ "linked" : [],
7+ "access" : " restricted" ,
8+ "baseBranch" : " main" ,
9+ "updateInternalDependencies" : " patch" ,
10+ "ignore" : []
11+ }
Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 3.0.0
4+
5+ ### Major Changes
6+
7+ - Use middleware responses instead of api page redirect
8+
9+ This removes the ` createApiPage ` export and uses Middleware responses to serve
10+ a 401 when basic authentication fails. This requires ` next ` >=13.1.
11+
12+ This is a much cleaner and less hacky approach to return the correct status code to a browser.
13+
14+ :warning : This is a _ breaking_ change, please use v2 if you are below ` next ` 13.1
15+
316## 2.0.0
17+
418- BREAKING CHANGE: Removes SSR Middleware
519- BREAKING CHANGE: Updates Next.js middleware to use API pages for 401 error message
620
721## 1.0.0
22+
823- Adds first version of the Next.js middleware
924
1025## 0.2.1
11- - fix(middleware): return true when request object does not have a url
26+
27+ - fix(middleware): return true when request object does not have a url
1228
1329## 0.2.0
30+
1431- fix(auth): fix empty credentials returning valid authorization
1532- fix(middleware): allow optional use of options object
1633- chore: update all dependencies
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ Options can be set on the basic auth middleware and overridden using environment
99
1010| Next.js version | Plugin version |
1111| --------------- | -------------- |
12- | Next.js 13 | 3.x |
13- | Next.js 12 | 2.x |
12+ | Next.js >=13.1 | 3.x |
13+ | Next.js 12,13.0 | 2.x |
1414| Next.js 10,11 | 1.x |
1515
1616
Original file line number Diff line number Diff line change 11{
2- "version" : " 2 .0.0" ,
2+ "version" : " 3 .0.0" ,
33 "license" : " MIT" ,
44 "main" : " dist/index.js" ,
55 "typings" : " dist/index.d.ts" ,
3838 "url" : " git+https://github.com/labd/nextjs-basic-auth-middleware"
3939 },
4040 "devDependencies" : {
41+ "@changesets/cli" : " 2.26.0" ,
4142 "@edge-runtime/jest-environment" : " ^1.1.0-beta.26" ,
4243 "@labdigital/eslint-config-node" : " ^0.0.5" ,
4344 "@types/jest" : " 26.0.15" ,
You can’t perform that action at this time.
0 commit comments