-
Notifications
You must be signed in to change notification settings - Fork 4k
feat: drop user id generation in createUser
#9381
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
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Ignored Deployments
|
* fix: add default user id generation * refactor: simplify `createUser` in adapters * fix typeorm * fix next-auth * fix tests * revert adapter changes * revert * revert * simplify adapter util * fix build errors
|
Do you still plan on "backporting" this for v4? I think with that recent "always set UUID to fallback What do you think? |
|
It looks like this issue did not receive any activity for 60 days. It will be closed in 7 days if no further activity occurs. If you think your issue is still relevant, commenting will keep it open. Thanks! |
Since this is a repetitive task that many adapters decided to do themselves, the parent libraries have been updated to not require adapters to generate an
idthemselves.Before this can be merged:
BREAKING CHANGE:
The adapter now requires the parent library (either
@auth/coreornext-authv4) to send theidproperty in thecreateUsermethod. Make sure to upgrade your parent library to their latest version.The parent library generates the id via
crypto.randomUUID(). If your custom adapter needs a different format, you can easily patch thecreateUser(method)to ignore the incomingid, or override it with your own type of id.