Balázs Orbán
e7af366a3b
chore(release): bump package version(s) [skip ci]
2022-12-13 22:04:43 +01:00
Balázs Orbán
3bdf7f56f0
fix(core): update README
2022-12-13 21:57:30 +01:00
Balázs Orbán
b00a694a4f
fix(frameworks): update @auth/sveltekit README
2022-12-13 21:56:53 +01:00
Balázs Orbán
6ffecfb87d
chore(release): bump package version(s) [skip ci]
2022-12-13 21:53:56 +01:00
Balázs Orbán
22c29361e5
feat(frameworks): Introduce SvelteKit Auth
2022-12-13 21:48:15 +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
6680860293
chore(release): bump versions [skip release]
2022-12-13 19:35:05 +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
2913fbac3b
chore(release): bump package version(s) [skip ci]
2022-12-12 14:53:01 +01:00
Balázs Orbán
2875b49f11
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
2022-12-12 13:47:34 +00:00
Balázs Orbán
5259d247a2
fix(next): correctly bundle next-auth/middleware
...
fixes #6025
2022-12-12 11:59:37 +01:00
Balázs Orbán
d1d93fd75e
chore(release): bump package version(s) [skip ci]
2022-12-11 15:52:57 +01:00
Balázs Orbán
62f672ae30
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
2022-12-11 14:48:28 +00:00
Balázs Orbán
2c669b32fc
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
2022-12-11 12:55:16 +00:00
Cyril Perraud
2dea8919e5
fix(sequelize): increase sequelize id_token column length ( #5929 )
...
Co-authored-by: Nico Domino <yo@ndo.dev >
2022-12-10 12:34:45 +01:00
Balázs Orbán
6fdb0da6eb
chore(release): bump package version(s) [skip ci]
2022-12-09 00:34:31 +01:00
Balázs Orbán
5c4a9a697d
fix(core): handle Request -> Response regressions ( #5991 )
...
* fix(next): don't override `Content-Type` by `unstable_getServerSession`
* fix(core): handle `,` while setting `set-cookie`
2022-12-08 23:29:25 +00:00
Balázs Orbán
b74bfc68e8
chore(release): bump package version(s) [skip ci]
2022-12-08 05:16:10 +01:00
Balázs Orbán
0a140cdf87
test(core): fix test
2022-12-08 05:11:37 +01:00
Balázs Orbán
157269e0fb
fix(core): throw error if no action can be determined
2022-12-08 05:10:26 +01:00
Balázs Orbán
221bc8e99c
fix(core): add protocol if missing
2022-12-08 04:54:42 +01:00
Balázs Orbán
f856363ac8
chore(release): bump package version(s) [skip ci]
2022-12-08 04:38:03 +01:00
Balázs Orbán
f3291025e6
fix(core): properly construct url ( #5984 )
2022-12-08 04:33:20 +01:00
Balázs Orbán
bc0912cc71
chore(release): bump package version(s) [skip ci]
2022-12-08 00:08:09 +01:00
Branden Cash
b19b2bcb3f
fix(core): don't mutate authOptions in unstable_getServerSession ( #5973 )
2022-12-07 22:04:53 +01:00
Balázs Orbán
0fcc6a0d04
refactor: more renames
2022-12-05 13:38:29 +01:00
Balázs Orbán
cbf8c7a59f
refactor: rename
2022-12-03 15:51:38 +01:00
Balázs Orbán
0e6c51adec
refactor: rename
2022-12-03 15:41:39 +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
Balázs Orbán
7e91d7df54
refactor(core): use standard Request and Response ( #4769 )
...
* 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
* fix neo4j build
* remove new-line
* reduce file changes in the PR
* fix tests
* fix tests
* refactor
* refactor
* add host tests
* refactor tests
* fix body reading
* fix tests
* use 302
* fix test
* fix again
* fix tests
* handle when body is `Buffer`
* move comment
2022-12-03 13:39:08 +00:00
Balázs Orbán
f2a07932b9
chore(release): bump package version(s) [skip ci]
2022-12-03 12:38:32 +01:00
Vedant
227a233bd8
chore(adapters): update firebase sdk version in firebase adapter ( #5902 )
...
* Update firebase SDK version
* Update pnpm-lock.yaml
* add `--debug`
* move flag
* add `FIREBASE_TOKEN`
* chore: upgrade `firebase-tools`
* revert peer dep change
* remove --debug flag
Co-authored-by: Balázs Orbán <info@balazsorban.com >
2022-12-03 11:29:09 +00:00
Vedant
cf9f133aa3
fix(adapters): tsconfig for firebase and pouchdb ( #5945 )
...
* Update tsconfig.json
* Update tsconfig.json
2022-12-03 09:48:55 +01:00
Arnaud Zheng
2301c1be44
chore(types): fix typo in comment ( #5815 )
...
Co-authored-by: Nico Domino <yo@ndo.dev >
2022-12-02 16:39:28 +01:00
jintak0401
6e408e24bf
fix(provider): modify response.name to response.nickname (Naver) ( #5915 )
...
fix(provider): modify response.name to response.nickname (Naver Provider)
Co-authored-by: Thang Vu <hi@thvu.dev >
2022-12-01 08:12:16 +07:00
Jason Brady
f277989c69
feat(core): make pkce and state maxAge configurable on the cookies ( #4719 )
...
* feat(cookies): make pkce and state maxAge configurable on the cookies (#4660 )
* added tests for pkce and state handlers
2022-12-01 08:02:42 +07:00
Balázs Orbán
a307079e0f
fix(ts): improve unstable_getServerSession return type ( #5792 )
...
Co-authored-by: Thang Vu <hi@thvu.dev >
2022-11-24 15:13:05 +01:00
Jacob Penny
d52b7a6b7d
chore(adapters): fix typo on Firebase Adapter ( #5813 )
2022-11-24 14:31:43 +01:00
Balázs Orbán
0d1757814f
fix(next): improve dev environment variable handling ( #5763 )
...
* fix(next): HIDE `NEXTAUTH_URL` warning locally
* refactor: move out `process.env` from core
* fix tests
* simplify
* swap
2022-11-20 09:08:10 +00:00
Thang Vu
068f9b50b8
chore(release): bump package version(s) [skip ci]
2022-11-19 21:29:28 +07: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
Nico Domino
cbf8ce3510
chore: fix signin btns svg URLs to 'main' ( #5826 )
2022-11-15 22:07:30 +01:00
Nico Domino
9d962a0056
feat: add signin button styles ( #5802 )
...
* feat: add signin button styles
* fix: remove unnecessary spans
chore: rm comments
* Update packages/next-auth/src/core/pages/signin.tsx
Co-authored-by: Balázs Orbán <info@balazsorban.com >
* feat: add provider svgs to repo
* fix: adjust SVG sizes
* fix: adjust provider btn to logo links
* feat: apple provider btn style
* fix: add apple-dark svg
* feat: atlassian logo and style
* feat: auth0 logo and style
* feat: azure logo and style
* fix: azure logo size
* feat: battlenet logo and style
* feat: box logo and style
* feat: cognito logo and style
* feat: discord logo and style
* feat: facebook logo and style
* feat: foursquare logo and style
* fix: foursquare logo size
* feat: freshbooks logo and style
* feat: gitlab logo and style
* fix: gitlab logo whitespace
* feat: hubspot logo and style
* feat: instagram logo and style
* feat: keycloak logo and style
* feat: keycloak logo resize
* feat: linkedin logo and style
* feat: mailchimp logo and style
* feat: okta logo and style
* feat: update okta logos
* feat: patreon logo and style
* fix: okta logo viewbox
* feat: slack logo and style
* feat: spotify logo and style
* feat: todoist logo and style
* fix: spotify logo size
* feat: trakt logo and style
* feat: twitch logo and style
* feat: twitter logo and style
* feat: vk logo and style
* feat: wikimedia logo and style
* feat: workos logo and style
* fix: wikimedia-dark logo + twitter (legacy)
* fix: button:active styling
* fix: ignore eslint inline css custom properties warning
* fix: improve darkmode default btn stylign
* fix: swap github btn colors
* fix: swap line btn theme colors
Co-authored-by: Balázs Orbán <info@balazsorban.com >
2022-11-15 16:46:42 +00:00
Håkon Collett Bjørgan
8387c78e3f
fix(core): update JSDoc for jwt in NextAuthOptions ( #5804 )
2022-11-13 07:55:35 +01:00
Balázs Orbán
58e30a6af6
chore(release): bump package version(s) [skip ci]
2022-11-07 21:33:48 +01:00
Balázs Orbán
782812a52b
fix(next): correctly parse headers with RSC ( #5753 )
...
* fix(next): correctly parse headers with RSC
* chore(dev): simplify/fix dev app
* make authOptions optional for RSC case
2022-11-07 20:19:14 +00:00
Balázs Orbán
32f2a0cea3
chore(release): bump package version(s) [skip ci]
2022-11-07 03:40:46 +01:00
Balázs Orbán
3343ef18b2
fix(next): conditional RSC support ( #5745 )
...
* fix(next): conditional RSC
* use Node 16 for version determination
* convert cookies
* use map instead of reduce
2022-11-07 02:33:47 +00:00
Balázs Orbán
52a2bf3e28
chore(release): bump package version(s) [skip ci]
2022-11-06 06:24:30 +01:00