-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: DbAuthHandler doesn't allow renaming User model #8743
Labels
bug/confirmed
We have confirmed this is a bug
Comments
antonmoiseev
added
the
bug/needs-info
More information is needed for reproduction
label
Jun 26, 2023
Josh-Walker-GM
added
bug/confirmed
We have confirmed this is a bug
and removed
bug/needs-info
More information is needed for reproduction
labels
Nov 15, 2023
Thanks @antonmoiseev! I just reproduced this following your instructions. I quickly noticed that this line appears to be related too:
I'm happy to help out some more if you still want to try out a PR for this. Otherwise I'll probably try to pick this up myself soon. |
Josh-Walker-GM
changed the title
[Bug?]: DbAuthHandler doesn't allow renaming User model
[Bug]: DbAuthHandler doesn't allow renaming User model
Nov 15, 2023
Josh-Walker-GM
added a commit
that referenced
this issue
Jan 2, 2024
**Problem** Logging in with webauthn enabled was broken when you had customised your schema to use different column names than the default. See #8743 for details. **Changes** 1. Alters the where clause to use the same column names as the create a few lines below. See: https://github.com/redwoodjs/redwood/blob/c7ae669e36c5e1b7edcd4ee5436558831bad94b8/packages/auth-providers/dbAuth/api/src/DbAuthHandler.ts#L979-L983 **Fixes** Fixes #8743
jtoar
pushed a commit
that referenced
this issue
Jan 3, 2024
**Problem** Logging in with webauthn enabled was broken when you had customised your schema to use different column names than the default. See #8743 for details. **Changes** 1. Alters the where clause to use the same column names as the create a few lines below. See: https://github.com/redwoodjs/redwood/blob/c7ae669e36c5e1b7edcd4ee5436558831bad94b8/packages/auth-providers/dbAuth/api/src/DbAuthHandler.ts#L979-L983 **Fixes** Fixes #8743
jtoar
pushed a commit
that referenced
this issue
Jan 3, 2024
**Problem** Logging in with webauthn enabled was broken when you had customised your schema to use different column names than the default. See #8743 for details. **Changes** 1. Alters the where clause to use the same column names as the create a few lines below. See: https://github.com/redwoodjs/redwood/blob/c7ae669e36c5e1b7edcd4ee5436558831bad94b8/packages/auth-providers/dbAuth/api/src/DbAuthHandler.ts#L979-L983 **Fixes** Fixes #8743
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What's not working?
DbAuthHandler explicitly references
user()
model in a Prisma query which doesn't allow renaming PrismaUser
model into anything else. This is where it's happening (line 810):redwood/packages/auth-providers/dbAuth/api/src/DbAuthHandler.ts
Lines 806 to 810 in 2a42df9
Instead it should use
authModelAccessor
to access the table.How do we reproduce the bug?
What's your environment? (If it applies)
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: