OrJDev
3d7985fd6d
fix: multiple set-cookie headers ( #6749 )
...
* fix: multiple set-cookie headers
* fx
2023-02-17 19:08:41 +01:00
Jakob Norlin
fed0a67917
fix: compatibility with edge runtimes ( #6739 )
...
* Bump @panva/hkdf to v1.0.3
Fixes #6736
* Update to v1.0.4
v.1.0.3 failed to publish it seems
* update lockfile
---------
Co-authored-by: Balázs Orbán <info@balazsorban.com >
2023-02-17 11:24:17 +00:00
Thang Vu
28583b8ab0
feat: drop crypto dependency, convert to ESM ( #6603 )
...
Co-authored-by: Balázs Orbán <info@balazsorban.com >
BREAKING CHANGE:
- This package now only ships ESM, as all maintained Node.js versions have native support
- Dropped the `crypto` Node.js import in favor of `uuid`. When `globalThis.crypto` is the default in the future, we can remove `uuid` again
2023-02-05 14:44:33 +01:00
Wyatt Ades
4258857e52
feat(adapters): move to firebase-admin in Firebase Adapter ( #6225 )
...
Co-authored-by: Balázs Orbán <info@balazsorban.com >
fixes https://github.com/nextauthjs/next-auth/issues/5049
closes https://github.com/nextauthjs/next-auth/pull/6230
closes https://github.com/nextauthjs/next-auth/pull/5449
closes https://github.com/nextauthjs/next-auth/pull/5055
fixes https://github.com/nextauthjs/next-auth/issues/4927
BREAKING CHANGE:
The adapter now expects `firebase-admin` instead of the `firebase` package and also supports either passing a config object or a firestore instance.
2023-02-05 14:41:20 +01:00
Balázs Orbán
e9d8805609
docs: api reference restructure ( #6608 )
2023-02-04 15:39:12 +01:00
Balázs Orbán
3f89e668ec
fix(ts): mark options provider config option internal ( #6564 )
...
* chore(dev): use workspace modules in Svelte app
* fix(ts): mark `options` provider config option internal
2023-01-30 12:34:54 +00:00
Thang Vu
06e891c0ea
chore: cache output for @auth/sveltekit
2023-01-24 15:22:42 +07:00
Balázs Orbán
b21709db40
chore: update lock file
2023-01-24 02:26:49 +01:00
Thang Vu
87d9cc4244
feat: e2e tests ( #6380 )
...
* feat: e2e test init
* run e2e test on CI
* Add credentials to ci
* Update pnpm-lock.yaml
* move test to dev
* add dotenv
* remove in examples
* add e2e command
* revert
* add output cache for turbo e2e
* correct path for upload artifact
* Update release.yml
2023-01-18 19:43:50 +07:00
Thang Vu
866e42b343
chore: revert to latest dependencies for examples
2023-01-10 21:05:06 +07:00
Thang Vu
c441f681af
chore: don't use latest for examples dependencies
2023-01-10 13:37:51 +07:00
Balázs Orbán
d142252499
chore: update lock file, prettier config
2023-01-09 13:29:28 +01:00
Thang Vu
5a6f76bf2c
fix: docs build ( #6253 )
...
* fix: docs build
* chore: move next-auth output to dist
* chore: add next-auth as deps for doc
* Revert "chore: move next-auth output to dist"
This reverts commit 9596a9134e6de4f4bd8dcfaa6d3002e98863d8f8.
* remove dist prefix
2023-01-02 16:57:14 +07:00
Balázs Orbán
3120d28299
chore: update lockfile
2023-01-01 16:03:09 +01:00
Balázs Orbán
09a075cc7e
fix(core): loosen dependency version requirements
2022-12-31 12:05:23 +01:00
Balázs Orbán
f1475955ea
chore: solidstart -> solid-start
2022-12-31 11:53:29 +01:00
Balázs Orbán
ba87e86d47
chore: update lock file
2022-12-31 11:42:08 +01:00
Balázs Orbán
054288316b
chore(examples): rename solid-start to solidstart
2022-12-31 11:31:47 +01:00
OrJDev
287c8f0f91
feat(solid-start): introduce @auth/solid-start package/example ( #6158 )
...
* feat: add solid framework package and example
* solidstart docs
* Update 02-oauth-tutorial.mdx
* minor docs fixes
* Fix sidebar typo
* Update sync.yml
* Update sidebars.js
* minor fixes
* fix deps
* upgrade auth example
* Update root.tsx
* Update NavBar.tsx
* Update Protected.tsx
* protected
* move example
* Update sidebars.js
Co-authored-by: Balázs Orbán <info@balazsorban.com >
Co-authored-by: Nico Domino <yo@ndo.dev >
2022-12-31 10:15:31 +00:00
Balázs Orbán
b0ecf4e861
chore: update lockfile
2022-12-31 08:41:32 +01:00
Thang Vu
4aec142525
chore: split apps to dev, examples, playgrounds ( #6228 )
...
* chore: dev -> dev/nextjs
* chore: move to /examples
* chore: move to playgrounds, add dev/sveltekit
* Update sync.yml
* chore: dev scripts
2022-12-31 07:17:42 +00:00
Balázs Orbán
7be4461253
chore: don't minify output CSS
2022-12-25 05:58:43 +01:00
Balázs Orbán
c2e06dc445
chore: upgrade oauth4webapi
2022-12-25 05:58:08 +01:00
Balázs Orbán
4dd70a5f6f
fix(ts): enable strict type checking
2022-12-25 05:55:25 +01:00
Balázs Orbán
137d993a13
chore(dev): upgrade next
2022-12-24 17:15:35 +01:00
Balázs Orbán
7116248e87
chore: mark @auth/* as prereleases
2022-12-24 03:30:53 +01:00
Balázs Orbán
9d6f54539d
chore: simplify eslint linting
2022-12-24 03:10:03 +01:00
Balázs Orbán
e5c0e3513b
chore: upgrade monorepo-release package
2022-12-24 01:33:50 +01:00
Balázs Orbán
7fd799a9ac
chore: only lint with prettier
2022-12-23 15:00:13 +01:00
Balázs Orbán
d7fbd05eba
chore: update monorepo-release package
2022-12-23 06:52:57 +01:00
Balázs Orbán
39c78f27b5
fix(sveltekit): update to latest @auth/core, autogenerate API reference ( #6153 )
...
* docs(sveltekit): autogenerate API reference
* feat(sveltekit): update to use latest `@auth/core`
* chore: format
* chore: add auth packages as docs dependency
* chore: format
* chore: more formatting
* chore: don't run build before tests
2022-12-23 02:17:24 +00:00
Balázs Orbán
b179f15cf3
chore: tweak release config
2022-12-23 01:49:04 +01:00
Nico Domino
0ea9ada3a9
chore(docs): remaining authjs.dev and repo clean up ( #6097 )
2022-12-22 18:04:52 +01:00
Balázs Orbán
6c45abf383
feat(core): improved logging / renames / new exports ( #6085 )
...
- Cleans up logging. Logs are now color-coded, added more debug logs, and errors can include some simple metadata (like provider id) to know which provider caused an issue.
- All errors are exposed via `@auth/core/errors`. Each error has a URL like: https://errors.authjs.dev#errorcode in the terminal, which points to the documentation explaining the problem in detail, suggesting a fix.
- Added a bunch of documentation that autogenerates the pages under https://authjs.dev/reference/core/modules/main
- Renames `AuthHandler` to `Auth` and `AuthOptions` to `AuthConfig`
- Throwing an error in `signIn` callback will now be caught as a general error and will redirect to `/error?error=Configuration`. If the callback returns `false`, it will redirect to `/error?error=AccessDenied`.
2022-12-22 02:36:54 +00:00
Balázs Orbán
f7275c7527
chore: type updates
...
fix import
chore: more docs update
2022-12-19 04:03:03 +01:00
Balázs Orbán
e699ff14b8
docs: /reference sidebar improvements ( #6115 )
...
* wip
* 🤖 lazy commit
* 🤖 lazy commit
* revert some changes, remove prettier jsdoc plugin for now
* sidebar tweaks
* add adapter module docs
* remove provider docs
* embed all reflections under modules
Based on: https://github.com/TypeStrong/typedoc/issues/2006
Related: https://github.com/tgreyuk/typedoc-plugin-markdown/issues/338
* no trailing slash, update theme
* updates
* update snapshot
* update sidebar and overview
2022-12-19 01:00:06 +00:00
ndom91
43c8f663c6
Revert "fix: pnpm-lock.yaml"
...
This reverts commit b16b048991 .
2022-12-18 04:06:37 +01:00
ndom91
b16b048991
fix: pnpm-lock.yaml
2022-12-18 04:05:16 +01:00
Balázs Orbán
8b5644453b
docs: set up API reference generation
2022-12-17 14:26:14 +01:00
Balázs Orbán
84291d3e81
chore: fix formatting and linting
2022-12-16 15:57:55 +01:00
Robert Soriano
1e6daa8304
chore(examples): use @auth/core in Nuxt playground ( #6081 )
...
* nuxt: rewrite server handler to use @auth/core
* nuxt: fix main tsconfig
* nuxt: remove unused module
* nuxt: update client and server ports
* nuxt: remove iframe style
* nuxt: update readme
2022-12-16 02:47:44 +00:00
Nico Domino
b7f1e3e7f8
docs: move to Auth.js ( #6024 )
...
Co-authored-by: Balázs Orbán <info@balazsorban.com >
Co-authored-by: Lluis Agusti <hi@llu.lu >
Co-authored-by: Thang Vu <hi@thvu.dev >
2022-12-14 18:33:49 +01:00
Balázs Orbán
ac30402c6a
chore(examples): move examples
2022-12-14 15:58:45 +01:00
Balázs Orbán
6aad07a95c
chore: update lock file
2022-12-14 13:10:13 +01:00
Balázs Orbán
f4a2430891
fix(release): build packages before publish
2022-12-14 02:45:18 +01:00
Balázs Orbán
b157554a5f
chore: move
2022-12-13 21:33:27 +01:00
Thang Vu
b5e1b19771
feat(frameworks): Introduce SvelteKit Auth ( #6041 )
...
* 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
* feat: add sveltekit auth
* 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
* fix AuthHandler, add getServerSession
* update lock file
* make logos optional
* sync with `next-auth`
* clean up `next-auth/edge`
* sync
* Sync (#2 )
* fix(core): properly construct url (#5984 )
* chore(release): bump package version(s) [skip ci]
* fix(core): add protocol if missing
* fix(core): throw error if no action can be determined
* test(core): fix test
* chore(release): bump package version(s) [skip ci]
* chore(docs): add new tutorial (#5604 )
Co-authored-by: Nico Domino <yo@ndo.dev >
* fix(core): handle `Request` -> `Response` regressions (#5991 )
* fix(next): don't override `Content-Type` by `unstable_getServerSession`
* fix(core): handle `,` while setting `set-cookie`
* chore(release): bump package version(s) [skip ci]
* fix(sequelize): increase sequelize `id_token` column length (#5929 )
Co-authored-by: Nico Domino <yo@ndo.dev >
* fix(core): correct status code when returning redirects (#6004 )
* fix(core): correctly set status when returning redirect
* update tests
* forward other headers
* update test
* remove default 200 status
* fix(core): host detection/NEXTAUTH_URL (#6007 )
* rename `host` to `origin` internally
* rename `userOptions` to `authOptions` internally
* use object for `headers` internally
* default `method` to GET
* simplify `unstable_getServerSession`
* allow optional headers
* revert middleware
* wip getURL
* revert host detection
* use old `detectHost`
* fix/add some tests wip
* move more to core, refactor getURL
* better type auth actions
* fix custom path support (w/ api/auth)
* add `getURL` tests
* fix email tests
* fix assert tests
* custom base without api/auth, with trailing slash
* remove parseUrl from assert.ts
* return 400 when wrong url
* fix tests
* refactor
* fix protocol in dev
* fix tests
* fix custom url handling
* add todo comments
* chore(release): bump package version(s) [skip ci]
* update lock file
* fix(next): correctly bundle next-auth/middleware
fixes #6025
* fix(core): preserve incoming set cookies (#6029 )
* fix(core): preserve `set-cookie` by the user
* add test
* improve req/res mocking
* refactor
* fix comment typo
* chore(release): bump package version(s) [skip ci]
* make logos optional
* sync with `next-auth`
* clean up `next-auth/edge`
* sync
Co-authored-by: Balázs Orbán <balazsorban44@users.noreply.github.com >
Co-authored-by: Thomas Desmond <24610108+thomas-desmond@users.noreply.github.com >
Co-authored-by: Nico Domino <yo@ndo.dev >
Co-authored-by: Cyril Perraud <perraud.cyril@gmail.com >
* merge
* clean up sveltekit auth handler
* upgrade playground to latest
* upgrade sveltekit auth to latest
* Some more refactoring
* feat: extract type to core and reuse in sveltekit
* 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
* revert
* feat sveltekit
* commit
* remove unused file, expose type
* remove nextauth_url, memoize locals.getSession
* move to dependency
* fix
* format
* fix post build
* simplify
* fix lock file
* add packages/frameworks
* update package.json
* update gitignore
* Delete .gitignore
* Update types.ts
* Update tsconfig.dev.json
* skip test
* format
* skip format/lint
Co-authored-by: Balázs Orbán <info@balazsorban.com >
Co-authored-by: Balázs Orbán <balazsorban44@users.noreply.github.com >
Co-authored-by: Thomas Desmond <24610108+thomas-desmond@users.noreply.github.com >
Co-authored-by: Nico Domino <yo@ndo.dev >
Co-authored-by: Cyril Perraud <perraud.cyril@gmail.com >
2022-12-13 20:10:53 +00: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
092ab9c128
chore: update release script
2022-12-13 18:01:45 +01: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