NextJS (Auth.js) example with PostgresAdapter #895
Closed
volodalexey
started this conversation in
General
Replies: 1 comment
-
So what this all means, in your case, just recast the type, because apart from the declaration, the code is correct: export const options: NextAuthOptions = {
adapter: PostgresAdapter(getDB().db.$pool as any as Pool),
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In NextJS (Auth.js) we have following example:
I want to use
pg-promise
instead.I found singletone approach here, however when I try to use internal
$pool
ofpg-promise
it is not the same asPool
from pg:I see following TS error:
Under the hood
pg-adapter
callsquery
from pg pool.Any ideas how to use
pg-promise
next-auth within adapter?Beta Was this translation helpful? Give feedback.
All reactions