Compare commits

...

2 Commits

Author SHA1 Message Date
GitHub Actions
0681531627 chore(release): bump package version(s) [skip ci] 2023-08-11 10:29:05 +00:00
Balázs Orbán
ea81c467e9 fix(ts): compatibility with next-auth v4 types (#8294)
* fix(ts): compatibility with `next-auth` v4

* revert

* stricter types
2023-08-11 11:26:03 +01:00
2 changed files with 16 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@auth/core",
"version": "0.10.3",
"version": "0.10.4",
"description": "Authentication for the Web.",
"keywords": [
"authentication",

View File

@@ -270,3 +270,18 @@ export interface Adapter {
token: string
}): Awaitable<VerificationToken | null>
}
// For compatibility with older versions of NextAuth.js
// @ts-expect-error
declare module "next-auth/adapters" {
type JsonObject = {
[Key in string]?: JsonValue
}
type JsonArray = JsonValue[]
type JsonPrimitive = string | number | boolean | null
type JsonValue = JsonPrimitive | JsonObject | JsonArray
interface AdapterAccount {
type: "oauth" | "email" | "oidc"
[key: string]: JsonValue | undefined
}
}