Replies: 2 comments 1 reply
-
The issue seems to stem from these: https://github.com/gimonaa/auth.qwik/blob/82c13d8a06b5f55164f17e26bdb91be1d43743db/package.json#L56 https://github.com/gimonaa/auth.qwik/blob/main/src/types/next-auth.d.ts First, you should not need to have Also, the type augmentation seems a bit messy. You should not augment |
Beta Was this translation helpful? Give feedback.
-
I tried to but @auth/qwik has no exported types, I can't extend User or AdapterUser. https://github.com/gimonaa/auth.qwik/blob/main/src/types/next-auth.d.ts Now I updated my repo removing next-auth but I don't know how to extend User or AdapterUser to include the role in the session and in JWT. https://github.com/gimonaa/auth.qwik Please help Thanks |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Environment
Reproduction URL
https://github.com/gimonaa/auth.qwik
Describe the issue
I would like to extend the user by also adding the role in the session. If I install only Qwik and add
@auth/qwik
, I can do this by extendingJWT
,User
, andSession
(in thetypes
folder). However, if I add Prisma, the@auth/core
folder is duplicated within@auth/qwik
, and the extension is no longer recognized, resulting in an error whererole
is not defined.Property
role
does not exist on typeUser | AdapterUser
.How to reproduce
if I delete the
@auth/qwik/node_modules
dir and its contents the problem disappears, then with annpm update
the folder i recreated and the problem reappearsExpected behavior
the role error should not appear in the JWT callback
Beta Was this translation helpful? Give feedback.
All reactions