Thang Vu
08a6835a70
fix: don't return res.end() in api handler ( #8244 )
...
Move #8069 to v4 branch
co-authored by @maritz
Co-authored-by: maritz <159633+maritz@users.noreply.github.com >
2023-08-06 22:38:57 +07:00
Thang Vu
bc683a5b72
chore: merge changes back to v4 ( #7430 )
...
* 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 >
2023-05-04 20:05:33 +01:00
Balázs Orbán
c261af4695
feat: support Route Handlers ( #6777 )
...
* feat: support Route Handlers
* update dev app
* init NextAuth via Route Handler in dev app
* import as type
* fix labeler
* default secret to `NEXTAUTH_SECRET`
* handle redirects
* support advanced init in Route Handlers
* use port 3000 for docs dev
* document initialization with Route Handlers
* upgrade to latest `next`
* upgrade to 13.3.0
* remove workaround
* cleanup
2023-04-09 10:51:49 +01:00
Balázs Orbán
fd4af6512e
chore: remove new stuff from v4 branch
2022-12-17 20:42:10 +01:00
Balázs Orbán
a7b6a29773
feat(web): expose Web API compatible version of next-auth ( #5536 )
...
* WIP use `Request` and `Response` for core
* bump Next.js
* rename ts types
* refactor
* simplify
* upgrade Next.js
* implement body reader
* use `Request`/`Response` in `next-auth/next`
* make linter happy
* revert
* fix tests
* remove workaround for middleware return type
* return session in protected api route example
* don't export internal handler
* fall back host to localhost
* refactor `getBody`
* refactor `next-auth/next`
* chore: add `@edge-runtime/jest-environment`
* fix tests, using Node 18 as runtime
* fix test
* remove patch
* upgrade/add dependencies
* type and default import on one line
* don't import all adapters by default in dev
* simplify internal endpoint config
Instead of passing url and params around as a string and an object,
we parse them into a `URL` instance.
* assert if both endpoint and issuer config is missing
* allow internal redirect to be `URL`
* mark clientId as always internally, fix comments
* add web-compatible authorization URL handling
* fix type
* fix neo4j build
* remove new-line
* reduce file changes in the PR
* simplify types
* refactor `crypto` usage
In Node.js, inject `globalThis.crypto` instead of import
* add `next-auth/web`
* refactor
* send header instead of body to indicate redirect response
* fix eslint
* fix tests
* chore: upgrade dep
* fix import
* refactor: more renames
* wip core
* support OIDC
* remove `openid-client`
* temprarily remove duplicate logos
* revert
* move redirect logic to core
* wip fix css
* revert Logo component
* output ESM
* fix logout
* deprecate OAuth 1, simplify internals, improve defaults
* refactor providers, test facebook
* fix providers
* target es2020
* fix CSS
* update lock file
* make logos optional
* sync with `next-auth`
* clean up `next-auth/edge`
* sync
* remove uuid
* make secret required in dev
* remove todo comments
* pass through OAuth client options
* generate declaration map
* default env secret to AUTH_SECRET
* temporary Headers fix
* move pages to lib
* move errors to lib
* move pages/index to lib
* move routes to lib
* move init to lib
* move styles to lib
* move types to lib
* move utils to lib
* fix imports
* update ignore/clean patterns
* fix imports
* update styles ts
* update gitignore
* update exports field
* revert `next-auth`
* remove extra tsconfig files
* remove `private` from package.json
* remove unused file, expose type
* move gitignore, reduce exposed types
* add back tsconfig files
* remove leftover
* revert gitignore
* remove test script
2022-12-13 18:24:30 +00:00
Balázs Orbán
c4352a7d56
chore(dev): upgrade dev app and deps
...
Conflicts:
apps/dev/pages/api/auth/[...nextauth].ts
2022-12-03 15:33:49 +01:00
Martin Sonnberger
dac490b7a1
feat(adapters): Add Supabase adapter ( #5050 )
...
* Add Supabase adapter
* Add Supabase adapter
* Add schema setup to docs
* supabase config changes
* chore: update to supabase-js v2.
* chore: migrate to next_auth schema.
* feat: add supabase examples.
* chore: update docs.
* chore: add telemetry.
* fix: resolve issues after merge.
* chore: extend session type.
* typo
* chore: remove unnecessary grants.
* fix: schema constraints.
Co-authored-by: thorwebdev <thor@supabase.io >
Co-authored-by: Thor 雷神 Schaeff <5748289+thorwebdev@users.noreply.github.com >
Co-authored-by: Thang Vu <hi@thvu.dev >
2022-11-19 20:56:20 +07:00
Balázs Orbán
f67959eb04
chore: update example to Next.js 13
2022-11-04 03:33:42 +01:00
Henrik Wenz
060953dacf
fix: support Next.js 13 ( #5710 )
...
* Migrate dev app to Next.js Version 13
* Update core types
* Fix middleware
https://github.com/nextauthjs/next-auth/issues/5649
* Use new ResponseCookie API
https://github.com/vercel/next.js/pull/41526
2022-11-04 03:32:48 +01:00
Balázs Orbán
f38ee19a8a
chore(dev): improve DX
2022-10-10 00:30:22 +02:00
Thang Vu
26a8c5fc6d
chore: lint in apps ( #5507 )
2022-10-06 22:14:12 +01:00
Balázs Orbán
44aaa6f1c3
chore: turbo cleanup ( #4951 )
...
* clean up `package.json` files
* chore(ts): make sure `next-auth/next` does not conflict with `next`
* simplify `turbo.json`
* fix: apply suggestion
* simplify doc dev command
* ignore upstash redis again
* ignore mikro orm for now
* chore: dev command
* update lock file
* update css path for dev only
* Update apps/dev/package.json
Co-authored-by: Thang Vu <thvu@hey.com >
2022-09-08 16:43:16 +02:00
Balázs Orbán
88ad25a16b
feat(adapters): update typeorm support ( #4844 )
...
We haven't kept up with the recent TypeORM changes, and since they are still <1, it's likely that users kept upgrading, even if there were breaking changes.
BREAKING CHANGE:
[`typeorm`](https://github.com/typeorm/typeorm ) is still in active development and has not yet published a stable release. Because of this, you can expect breaking changes in minor versions. This release of the adapter expects `typeorm@0.3.7` and is not validated against previous or future releases.
Run `npm i typeorm@latest` and make sure to read the [release notes](https://github.com/typeorm/typeorm/releases ) for breaking changes in TypeORM
2022-07-08 19:26:59 +02:00
Balázs Orbán
9457593038
chore: update Next.js example, bump dependencies
2022-07-07 11:31:17 +02:00
Balázs Orbán
a911b4a40b
chore(deps): upgrade dependencies
2022-06-28 12:22:11 +02:00
Balázs Orbán
99f5b9616f
fix: update Middleware ( #4757 )
...
* merge `main`, fix workspace dependencies
* chore(dev): use `matcher` in Middleware
* fix(middleware): support `cookies` as `Map`
* simplify
* chore(example): use new Middleware API
* chore(example): use `next-auth@latest`
* docs(middleware): document new Middleware API
* docs(ts): update inline example
* fix(ts): make cookies optional
* remove non-null assertion
2022-06-24 14:11:39 +02:00
Thang Vu
4f29d39521
chore: move to pnpm ( #4420 )
...
* feat: pnpm
* Update publish script
* gitignore the pnpm debug log
* Fix workspace
* Fix dev commands
* feat: pnpm
* Update publish script
* gitignore the pnpm debug log
* Fix workspace
* Fix dev commands
* chore: fix pnpm install in GitHub Action
* fix: update tsconfig path
* pnpm run -> pnpm
* chore: remove cache-node and add back setup-node
* fix: tsconfig dependencies
* chore: fix tsconfig path
* fix: adapter-test dependencies
* fix: setup-node for release-pr
* fix: import adapter-test
* chore: update workspace dependency for next-auth
* fix: test failure
* fix: add jest for adapters
* fix: jest again
* fix: mongo in prisma
* fix: `--no-git-checks` for `release-pr`
Co-authored-by: Balázs Orbán <info@balazsorban.com >
2022-05-03 15:05:55 +02:00
Balázs Orbán
d66d963e86
fix: ensure Prisma/MongoDB integration ( #4083 )
...
* chore(deps): upgrade Prisma
* fix: ignore `id` when not needed
* test: ensure MongoDB/Prisma integration
* test: remove table mappers
* docs(adapters): mention MongoDB in the Prisma adapter
* docs: plural
* fix: `@ts-ignore`
* docs: typo, consistency
2022-03-01 05:52:56 +01:00
dependabot[bot]
b6bf2366e2
chore(deps): bump next from 12.0.9 to 12.1.0 ( #4005 )
...
Bumps [next](https://github.com/vercel/next.js ) from 12.0.9 to 12.1.0.
- [Release notes](https://github.com/vercel/next.js/releases )
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js )
- [Commits](https://github.com/vercel/next.js/compare/v12.0.9...v12.1.0 )
---
updated-dependencies:
- dependency-name: next
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-18 06:21:11 +01:00
Balázs Orbán
a7c55b752f
chore(dev): move dev app to apps workspace ( #3888 )
...
* chore: move dev app
* chore: run tests sequentially
2022-02-09 01:12:24 +01:00