Skip to content

Commit eb33c9d

Browse files
authoredOct 27, 2021
refactor: decouple Next.js from core (#2857)
* refactor: decouple Next.js from core (WIP) * refactor: use `base` instead of `baseUrl`+`basePath` * fix: signout route * refactor(ts): convert files to TS * fix: imports * refactor: convert callback route * fix: add `next` files to package * chore(dev): alias npm email * refactor: do not merge req with user options * refactor: rename userOptions to options * refactor: use native `URL` in `parseUrl` * refactor: move Next.js specific code to `next` module * refactor(ts): return `OutgoingResponse` on all routes * fix: change `base` to `url` * feat: introduce `getServerSession` * refactor: move main logic to `handler` file * chore(dev): showcase `getServerSession` * feat: extract `sessionToken` from Authorization header * fix: pass headers to getServerSession * refactor: rename `server` to `core` * refactor: re-export `next-auth/next` in `next-auth` * fix: add `core` to npm package * fix: re-export default method * feat: return `body`+`header` instead of `json`,`text` * feat: pass `NEXTAUTH_URL` as a variable to core * refactor: simplify Next.js wrapper * feat: export `client/_utils` * fix(ts): suppress TS errors
1 parent 58a98b6 commit eb33c9d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1429
-974
lines changed
 

‎.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@ node_modules
2929
/client
3030
/css
3131
/lib
32-
/server
32+
/core
3333
/jwt
3434
/react
3535
/adapters.d.ts
3636
/index.d.ts
3737
/index.js
38+
/next
3839

3940
# Development app
4041
app/src/css

‎app/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"copy:css": "cpx \"../css/**/*\" src/css --watch",
1111
"watch:css": "cd .. && npm run watch:css",
1212
"start": "next start",
13-
"start:email": "npx fake-smtp-server"
13+
"email": "npx fake-smtp-server",
14+
"start:email": "email"
1415
},
1516
"license": "ISC",
1617
"dependencies": {

0 commit comments

Comments
 (0)
Please sign in to comment.