Skip to content
This repository was archived by the owner on Nov 19, 2021. It is now read-only.

Tags

Tags

v4.0.0-beta.2

Toggle v4.0.0-beta.2's commit message

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
fix(ts): hint built-in provider types in `signIn` (nextauthjs#2655)

* Change singIn provider type to optional string

* provider intellisense support

* restore clean

* Requested changes

Co-authored-by: Balázs Orbán <info@balazsorban.com>

v4.0.0-beta.1

Toggle v4.0.0-beta.1's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
chore: remove `test:types` script in release workflow

v4.0.0-next.26

Toggle v4.0.0-next.26's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix: avoid infinite loop in error handlers (nextauthjs#2647)

* fix: avoid infinite loop in error handlers

* chore(dev): remove mongodb folder

v4.0.0-next.25

Toggle v4.0.0-next.25's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat(client): remove `staleTime` (nextauthjs#2613)

BREAKING CHANGE:

`staleTime` (previously `clientMaxAge`) has been removed. Check out `refetchInterval` instead. It should cover most of the cases. If not, we can look into adding this back later on.

v4.0.0-next.24

Toggle v4.0.0-next.24's commit message

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
feat(provider): add Keycloak provider (nextauthjs#2485)

* add Keycloak provider

* Update src/providers/keycloak.js

Co-authored-by: Balázs Orbán <info@balazsorban.com>

Co-authored-by: Balázs Orbán <info@balazsorban.com>

v3.29.0

Toggle v3.29.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix(deps): update built-in adapter dependencies (nextauthjs#2589)

* fix(deps): update prisma-legacy-adapter and typeorm-legacy-adapter dependencies

* chore: add missing package-lock update

v4.0.0-next.23

Toggle v4.0.0-next.23's commit message

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
fix(ts): allow void return type on delete operations

v4.0.0-next.22

Toggle v4.0.0-next.22's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
feat: simplify Adapter API (nextauthjs#2361)

BREAKING CHANGE:

`prisma-legacy` is now gone. Use `@next-auth/prisma-adapter`. Any features from the old adapter will be migrated over to the new one eventually. This is done so we can require the same default set of options from all the built-in providers, rather than allowing ambiguity on what an official adapter has to support.

The `TypeORM` adapter will probably be the only one migrated as-is, but in the future, we would like to break it down to lighter-weight adapters that only support single databases.

Adapters no longer have to return a `getAdapter()` method, they can return the actual adapter methods instead. All the values previously being provided through the arguments of `getAdapter` will now be available in a more digestible format directly in the concerning methods. This behavior was created so that connections could be handled more efficiently. Our review has shown that currently, the TypeORM adapter is the only one that does not handle connections out-of-the-box, so we are going to look into how we can create a wrapper/util function to make it work in the new version. For all other adapters, this will be a huge gain, as with this new API, methods are actually overrideable without creating a whole new custom adapter! 🥳

Example:

```js
function MySlightlyCustomAdapter(...args) {
  const adapter = AdapterFromSomeoneElse(...args)
  adapter.someMethodIWantToModify = (...args) => {
    // Much better implementation goes here.
  }
  return adapter
}
```

**The following method names are changing:**

```diff
- getSession
+ getSessionAndUser
```
This method now requires that you return both the user and the session as `{user, session}`. If any of these could not be retrieved, you will have to return `null` instead. (In other words, this must be a transaction.) This requires one less database call, improving the user session retrieval. Any expiry logic included in the Adapter before is now done in the core as well.

```diff
- createVerificationRequest
+ createVerificationToken
```
Better describes the functionality. This method no longer needs to call `provider.sendVerificationRequest`, we are moving this into the core. This responsibility shouldn't have fallen to the adapter in the first place.

`createVerificationToken` will now receive a `VerificationToken` object, which looks like this:
```ts
interface VerificationToken {
  identifier: string
  expires: Date
  token: string
}
```

The token provided is already hashed, so nothing has to be done, simply write it to your database. (Here we lift up the responsibility from the adapter to hash tokens)


```diff
- getVerificationRequest
+ useVerificationToken
```
Better describes the functionality. It now also has the responsibility to delete the used-up token from the database. Most ORMs should support retrieving the value while deleting it at the same time, so it will reduce the number of database calls.

``` diff
- deleteVerificationRequest
```
This method is gone. See `useVerificationToken`.

Most of the method signatures have been changed, have a look at the [TypeScript interface](https://github.com/nextauthjs/next-auth/blob/ba4ec5faa357457661ccf55a4981fcef0514dd9b/types/adapters.d.ts) to get a better picture.

v4.0.0-next.21

Toggle v4.0.0-next.21's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix(ts): fix internal react type import (nextauthjs#2450)

Co-authored-by: Lluis Agusti <hi@llu.lu>

v3.28.0

Toggle v3.28.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
fix(ts): allow `scope` as string array type (nextauthjs#2511)

⌂ Proxy