Skip to content

Commit bd37c55

Browse files
authoredJul 16, 2023
fix(ts): adapter interface (#8054)
1 parent 169a523 commit bd37c55

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed
 

‎packages/next-auth/src/adapters.ts

+1-18
Original file line numberDiff line numberDiff line change
@@ -59,24 +59,7 @@ export interface VerificationToken {
5959
* [Adapters Overview](https://next-auth.js.org/adapters/overview) |
6060
* [Create a custom adapter](https://next-auth.js.org/tutorials/creating-a-database-adapter)
6161
*/
62-
export type Adapter<WithVerificationToken = boolean> = DefaultAdapter &
63-
(WithVerificationToken extends true
64-
? {
65-
createVerificationToken: (
66-
verificationToken: VerificationToken
67-
) => Awaitable<VerificationToken | null | undefined>
68-
/**
69-
* Return verification token from the database
70-
* and delete it so it cannot be used again.
71-
*/
72-
useVerificationToken: (params: {
73-
identifier: string
74-
token: string
75-
}) => Awaitable<VerificationToken | null>
76-
}
77-
: {})
78-
79-
export interface DefaultAdapter {
62+
export interface Adapter {
8063
createUser: (user: Omit<AdapterUser, "id">) => Awaitable<AdapterUser>
8164
getUser: (id: string) => Awaitable<AdapterUser | null>
8265
getUserByEmail: (email: string) => Awaitable<AdapterUser | null>

1 commit comments

Comments
 (1)
Please sign in to comment.