-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
feat: drop user id generation in createUser
#9381
Draft
balazsorban44
wants to merge
9
commits into
main
Choose a base branch
from
feat/drop-user-id-from-adapters
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Ignored Deployments
|
github-actions
bot
added
adapters
Changes related to the core code concerning database adapters
dynamodb
@auth/dynamodb-adapter
neo4j
@auth/neo4j-adapter
pouchdb
@auth/pouchdb-adapter
upstash-redis
@auth/upstash-redis-adapter
typeorm
@auth/typeorm-adapter
drizzle
@auth/drizzle-adapter
kysely
d1
azure-tables
labels
Dec 13, 2023
* 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
balazsorban44
had a problem deploying
to
Preview
December 13, 2023 05:03
— with
GitHub Actions
Failure
balazsorban44
had a problem deploying
to
Preview
December 13, 2023 05:15
— with
GitHub Actions
Failure
balazsorban44
had a problem deploying
to
Preview
December 14, 2023 04:03
— with
GitHub Actions
Failure
balazsorban44
had a problem deploying
to
Preview
December 14, 2023 04:13
— with
GitHub Actions
Failure
balazsorban44
had a problem deploying
to
Preview
December 21, 2023 15:05
— with
GitHub Actions
Failure
Do you still plan on "backporting" this for v4? I think with that recent "always set UUID to fallback What do you think? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
adapters
Changes related to the core code concerning database adapters
azure-tables
d1
drizzle
@auth/drizzle-adapter
dynamodb
@auth/dynamodb-adapter
kysely
mongodb
@auth/mongodb-adapter
neo4j
@auth/neo4j-adapter
pouchdb
@auth/pouchdb-adapter
typeorm
@auth/typeorm-adapter
upstash-redis
@auth/upstash-redis-adapter
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
id
themselves.Before this can be merged:
BREAKING CHANGE:
The adapter now requires the parent library (either
@auth/core
ornext-auth
v4) to send theid
property in thecreateUser
method. 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.