Balázs Orbán
c194261617
fix(core): respect NEXTAUTH_SECRET in unstable_getServerSession ( #4774 )
...
* fix(core): respect `NEXTAUTH_SECRET` in `unstable_getServerSession`
* add `secret` tests
* add `@types/jest`
* fix tests
2022-06-27 17:00:08 +02:00
Nico Domino
5fdd8483d8
chore: add security headers to docs vercel.json ( #4766 )
2022-06-24 14:30:48 +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
Michael Hays
d8d9ab94cb
feat(core): pass profile to linkAccount event ( #4242 )
...
Co-authored-by: Nico Domino <yo@ndo.dev >
2022-06-24 12:03:20 +02:00
Nico Domino
e8827cbf45
chore(docs): update securing pages tutorial ( #3982 )
...
Co-authored-by: Lluis Agusti <hi@llu.lu >
Co-authored-by: Thang Vu <31528554+ThangHuuVu@users.noreply.github.com >
2022-06-24 10:02:26 +02:00
Balázs Orbán
37c4a813e3
chore: bump version
next-auth@v4.6.1
2022-06-23 16:48:10 +02:00
Balázs Orbán
6a23ff7126
fix(build): include utils in package ( #4760 )
...
* fix: include `utils` in package
* fix: import `InternalUrl` as type
* `"emitDeclarationOnly": false`
* don't ignore `types.ts` in build
2022-06-23 16:41:01 +02:00
Balázs Orbán
23db0e68dd
chore: bump version
2022-06-23 12:30:56 +02:00
Arthur Pedroti
e03e234b86
fix(ts): infer provider type in signIn ( #4679 )
...
* fix: signIn infer provider type
The "P" type it's not passed in any props, so the result type doesn't understand and return the false type always, Adding the "P" at provider type props.
* fix: P possibly undefined
Co-authored-by: arthurpedroti@gmail.com <arthurpedroti@LAPTOP-MVAK9RM5.localdomain >
2022-06-23 12:18:32 +02:00
Thang Vu
66fb914a31
feat: introduce experimental unstable_getServerSession API ( #4116 )
...
* refactor: improve `getServerSession` API
* Apply review comment
Co-authored-by: Balázs Orbán <info@balazsorban.com >
* Apply review comment
Co-authored-by: Balázs Orbán <info@balazsorban.com >
* Apply review comment
Co-authored-by: Balázs Orbán <info@balazsorban.com >
* Apply review comment
Co-authored-by: Balázs Orbán <info@balazsorban.com >
* Apply review comment
Co-authored-by: Balázs Orbán <info@balazsorban.com >
* Apply review comment
Co-authored-by: Balázs Orbán <info@balazsorban.com >
* Address docs review
* Fix a typo
* Update lint file location
* Address review comments
* getServerSession -> unstable_getServerSession
* Apply suggestions from code review
* Apply suggestions from code review
Co-authored-by: Dragate <spidfair@gmail.com >
* Update packages/next-auth/package.json
Co-authored-by: Balázs Orbán <info@balazsorban.com >
Co-authored-by: Dragate <spidfair@gmail.com >
2022-06-23 12:15:15 +02:00
Balázs Orbán
8ce728197f
chore: update to use release token
2022-06-23 12:10:05 +02:00
ml4den
87d1a7af6d
docs(providers): Change env names ( #4753 )
...
Proposing to match the env names to what is in the example [...nextauth].ts
2022-06-22 22:23:04 +02:00
Matthew Francis Brunetti
172813f987
docs(adapters): fix references to deprecated adapters repo ( #4737 )
2022-06-22 18:12:07 +02:00
dependabot[bot]
cc934fceec
chore(deps): bump next-auth in /apps/playground-sveltekit ( #4746 )
...
Bumps [next-auth](https://github.com/nextauthjs/next-auth ) from 4.3.3 to 4.5.0.
- [Release notes](https://github.com/nextauthjs/next-auth/releases )
- [Changelog](https://github.com/nextauthjs/next-auth/blob/main/CHANGELOG.md )
- [Commits](https://github.com/nextauthjs/next-auth/compare/next-auth@v4.3.3...next-auth@v4.5.0 )
---
updated-dependencies:
- dependency-name: next-auth
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-06-22 18:07:17 +02:00
Guillermo Villegas Gray
46e467a7cb
docs(providers): typo in slack.md ( #4733 )
...
typo in slack.md, thanks for the warning though!
2022-06-22 18:06:59 +02:00
Gal Schlezinger
73d489beac
fix(edge): support request.cookies as a map ( #4745 )
...
in next Next.js versions, NextRequest.cookies will be an instance of NextCookies which is
some kind of a Map, instead of a plain object.
This commit checks whether there's a `get` function in req.cookies, and acts accordingly,
to make sure we will support newer Next.js versions with Edge Functions/Middleware
2022-06-21 20:20:48 +02:00
Balázs Orbán
e498483b23
test: add test for invalid callbackUrl handling
2022-06-20 10:38:21 +02:00
Cody Ogden
7cf49566a6
docs(providers/workos.md): Update reference link. ( #4721 )
...
The file extension changed to `.ts`.
2022-06-16 18:38:34 +02:00
Balázs Orbán
2469e44572
feat: allow standard Request in NextAuthHandler ( #4704 )
...
* chore: upgrade dev dependencies
* chore: use SWC for test transforms
* feat: allow standard `Request` as `NextAuthHandler` argument
* test: add initial core tests
* chore: ignore `tests` in build
* chore: fix lint
* chore: move `lib` to `utils`
* add body parsing, simplify
* fix tests
* chore: use `NPM_TOKEN_PKG` for experimental release
2022-06-14 12:25:07 +02:00
Danny Luedke
408b6b175f
chore(sveltekit): cookie.parse type error for null ( #4580 )
2022-06-14 00:32:53 +02:00
ike
92dfc3c8b0
fix(providers): use client_secret_post auth method for Instagram ( #4705 )
2022-06-14 00:23:23 +02:00
Balázs Orbán
8c5d9faad6
chore: bump versions
...
[skip ci]
next-auth@v4.5.0
2022-06-14 00:10:16 +02:00
Balázs Orbán
49a8d51f79
fix: don't show error on relative callbackUrl
...
fixes #4700
2022-06-12 14:37:04 +02:00
Balázs Orbán
c0d251731d
chore: bump version
2022-06-10 14:52:05 +02:00
Balázs Orbán
76560aed5a
chore: no git checks on publish
2022-06-10 14:39:43 +02:00
Balázs Orbán
25517b7315
fix: handle invalid callbackUrl
2022-06-10 13:52:00 +02:00
Tom Freudenberg
4daa63d5e1
feat(callback): return always status code 401 on error ( #4601 )
2022-06-09 18:43:50 +02:00
Chris Betz
81afeef194
feat(provider): Add United Effects provider ( #4546 )
...
* Adding United Effects as a provider
* Update packages/next-auth/src/providers/united-effects.ts
* returning name and image as null in profile response
Co-authored-by: Lluis Agusti <hi@llu.lu >
2022-06-04 00:03:23 +02:00
Or Linzer
008f29e6f8
docs(next): Update config comment ( #4664 )
...
* Update Custom JWT decode method
* Update docs/docs/configuration/nextjs.md
Co-authored-by: Lluis Agusti <hi@llu.lu >
2022-06-03 23:53:19 +02:00
Balázs Orbán
e4ee520b4a
fix(ts): allow getToken in getServerSideProps ( #4659 )
2022-05-31 19:05:35 +02:00
Balázs Orbán
358b80d4ce
feat(providers): make issuer configurable on Salesforce ( #4658 )
2022-05-31 19:02:35 +02:00
Balázs Orbán
0a7a916228
fix(ts): remove unused type ( #4657 )
2022-05-31 18:55:34 +02:00
Balázs Orbán
612c35e8c2
Revert "fix(ts): signIn infer provider type ( #4623 )" ( #4655 )
...
This reverts commit 46089eb5ae .
2022-05-31 18:44:54 +02:00
Thomas Knickman
9f6949816c
chore(release): increase checkout depth ( #4654 )
...
Fetch two commits in CI so HEAD^1 is able to function correctly to determine diff between last commit and now.
2022-05-31 18:37:22 +02:00
Arthur Pedroti
46089eb5ae
fix(ts): signIn infer provider type ( #4623 )
...
The "P" type it's not passed in any props, so the result type doesn't understand and return the false type always, Adding the "P" at provider type props.
2022-05-31 18:29:34 +02:00
42Atomys
7d8cc70faf
feat(middleware): support custom cookieName ( #4385 )
...
* feat: Add the support of custom cookieName on the next-auth/middleware
* chore: Only accept used params based on NextAuthConfig
* docs: Remove duplicated docs
Co-authored-by: Balázs Orbán <info@balazsorban.com >
2022-05-31 18:29:15 +02:00
Thanh Nhan
75602a3f04
fix(middleware): use relative URL for sign-in page callbackUrl ( #4534 )
...
* Use relative URL for middleware's signin callbackUrl
* Include params to callbackUrl if any
* For testing purpose, append params to existing link for test instead of create another one
* Update apps/dev/components/header.js
Co-authored-by: CODY Mai <nhan.mai@shiftasia.com >
Co-authored-by: Thang Vu <31528554+ThangHuuVu@users.noreply.github.com >
2022-05-31 18:14:24 +02:00
Shubham Jain
5b8a619cd0
docs: Remove trailing '/' from Authentik issuer example ( #4646 )
...
The Authentik provider already adds a `/` after the `issuer`, so this creates a double slash that causes a NextAuth `SIGNIN_OAUTH_ERROR` ("expected 200 OK, got: 301 Moved Permanently").
2022-05-31 18:13:32 +02:00
Alvin Li
16622f6428
feat(middleware): support custom jwt.decode ( #4210 )
...
* feat: custom jwt decode method for middleware
* Update docs/docs/configuration/options.md
Co-authored-by: Thang Vu <31528554+ThangHuuVu@users.noreply.github.com >
Co-authored-by: Thang Vu <31528554+ThangHuuVu@users.noreply.github.com >
Co-authored-by: Nico Domino <yo@ndo.dev >
2022-05-31 17:45:37 +02:00
dependabot[bot]
e203801f30
chore(deps): bump next-auth in /apps/playground-sveltekit ( #4615 )
...
Bumps [next-auth](https://github.com/nextauthjs/next-auth ) from 4.3.2 to 4.3.3.
- [Release notes](https://github.com/nextauthjs/next-auth/releases )
- [Changelog](https://github.com/nextauthjs/next-auth/blob/main/CHANGELOG.md )
- [Commits](https://github.com/nextauthjs/next-auth/compare/next-auth@v4.3.2...next-auth@v4.3.3 )
---
updated-dependencies:
- dependency-name: next-auth
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-05-26 11:06:46 +02:00
Nico Domino
cfc0a55080
docs: add note to ensure pages actually exist ( #4618 )
...
* chore(docs): add note to ensure pages actually exist
* Update docs/docs/configuration/options.md
Co-authored-by: Balázs Orbán <info@balazsorban.com >
* Update docs/docs/configuration/pages.md
Co-authored-by: Balázs Orbán <info@balazsorban.com >
Co-authored-by: Balázs Orbán <info@balazsorban.com >
2022-05-25 14:33:05 +02:00
mohammed hussam
dda4e0a7d8
docs: update blog link ( #4591 )
...
Authentication Patterns for Next.js is moved official next.js docs https://nextjs.org/docs/authentication#authentication-patterns
2022-05-20 19:48:52 +02:00
PalanikannanM
374f886e84
chore(tutorial): fixing the expires_in method of account object to expires_at ( #4540 )
...
Co-authored-by: Lluis Agusti <hi@llu.lu >
2022-05-19 22:28:07 +02:00
Ephraim Atta-Duncan
db188b872f
docs: update screenshot ( #4571 )
2022-05-17 10:10:17 +02:00
Matías Aguilera
2838dd7e0f
docs: fix font size for small devices ( #4558 )
...
Co-authored-by: Lluis Agusti <hi@llu.lu >
2022-05-14 23:55:03 +02:00
Imamuzzaki Abu Salam
08f6b31e41
missing "role" in the first sentence ( #4560 )
2022-05-14 09:36:01 +02:00
rgsthethird
602668f93c
Small grammar fix ( #4531 )
...
'this environment variable must be set', instead of 'this environment variables must be set'.
2022-05-13 12:20:55 +02:00
Nico Domino
641d917175
chore: update test script and turborepo dependency ( #4490 )
...
Co-authored-by: Thang Vu <31528554+ThangHuuVu@users.noreply.github.com >
2022-05-07 13:35:46 +02:00
Nico Domino
70d59bb6e7
chore(docs): fix formatting / syntax ( #4523 )
2022-05-07 12:19:42 +02:00
Nico Domino
0c86d5a370
chore(docs): rm sandpack - unused ( #4521 )
2022-05-07 00:18:00 +02:00