Skip to content

fix(adapters): autogenerate user id in the kysely adapter#9356

Merged
balazsorban44 merged 3 commits into
nextauthjs:mainfrom
Schniz:autogenerate-id-in-kysely-adapter
Dec 10, 2023
Merged

fix(adapters): autogenerate user id in the kysely adapter#9356
balazsorban44 merged 3 commits into
nextauthjs:mainfrom
Schniz:autogenerate-id-in-kysely-adapter

Conversation

@Schniz
Copy link
Copy Markdown
Contributor

@Schniz Schniz commented Dec 9, 2023

NOTE:

  • It's a good idea to open an issue first to discuss potential changes.
  • Please make sure that you are NOT opening a PR to fix a potential security vulnerability. Instead, please follow the Security guidelines to disclose the issue to us confidentially.

☕️ Reasoning

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

Please scout and link issues that might be solved by this PR.

Fixes: INSERT_ISSUE_LINK_HERE

📌 Resources

@Schniz Schniz requested a review from ndom91 as a code owner December 9, 2023 19:53
@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2023 2:46am
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
auth-docs-nextra ⬜️ Ignored (Inspect) Visit Preview Dec 10, 2023 2:46am
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Dec 10, 2023 2:46am

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 9, 2023

@Schniz is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added adapters Changes related to the core code concerning database adapters kysely labels Dec 9, 2023
@Schniz Schniz requested a review from 0ubbe as a code owner December 10, 2023 02:38
@balazsorban44 balazsorban44 changed the title fix: kysely-adapter: autogenerate id in the kysely adapter fix(adapters): autogenerate id in the kysely adapter where needed Dec 10, 2023
pool: new Pool({
host: "localhost",
database: "kysely_test",
user: "kysely",

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "kysely" is used as [user name](1).
pool: createPool({
database: "kysely_test",
host: "localhost",
user: "kysely",

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "kysely" is used as [user name](1).
database: "kysely_test",
host: "localhost",
user: "kysely",
password: "kysely",

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "kysely" is used as [password](1).
@balazsorban44 balazsorban44 changed the title fix(adapters): autogenerate id in the kysely adapter where needed fix(adapters): autogenerate user id in the kysely adapter Dec 10, 2023
@balazsorban44 balazsorban44 merged commit 9122955 into nextauthjs:main Dec 10, 2023
@AchalS-iglu
Copy link
Copy Markdown

AchalS-iglu commented Mar 31, 2024

Why did we switch to using those core Adapter types? I am not able to type the Database interface. Look at #10441, could you guide me on how to properly implement it. I am using the same schema mentioned in the docs.

I think you should use standard schema style for verifying schema, that was being used and Selectable<T> for everything else. I will try something I suppose.

@AchalS-iglu
Copy link
Copy Markdown

AchalS-iglu commented Mar 31, 2024

I will test it in my app and get back to you! It did fix my typing errors.

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 kysely

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants