-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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]: Continuous modification of user information results in an error #1374
Comments
Hi @Niyaco, I can reproduce it. |
I'm quite busy right now handling it but based on my first tests, it's due to using the username from the token on backend side to find the user to be updated. It happens by firstly updating the username. |
Then why not use something that does not change to generate the token? Maybe user id? If it seems that it may cause security issue, then why not create one unique id for each user only to use it for access token and it will never change and eliminate all data from token which can be changed by user |
Yes exactly, that's what I have in mind (there is already a unique id for each user, but not exposed to the API currently). |
Relevant scope
Deployed demo
Description
When I try to modify user information for the second time consecutively, the server returns a status code of 500 and displays the following error message: “\nInvalid prisma.user.update() invocation:\n\n\nAn operation failed because it depends on one or more records that were required but not found. Record to update not found.”
The text was updated successfully, but these errors were encountered: