Skip to content
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

🐛 fix: fix wrong email linking in next-auth db adapter #4919

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

cy948
Copy link
Contributor

@cy948 cy948 commented Dec 7, 2024

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • 📝 docs
  • 🔨 chore

🔀 变更说明 | Description of Change

  • 🐛 src/libs/next-auth/adapter/index.ts: 修复当用户没有邮箱时,会根据邮箱用户链接到其他用户。
  • 🧪 src/database/server/models/__tests__/nextauth.test.ts: 当存在一个没有邮箱的用户A时,再创建一个没有邮箱的用户不会自动链接到用户B。

📝 补充信息 | Additional Information

Copy link

vercel bot commented Dec 7, 2024

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

Name Status Preview Comments Updated (UTC)
lobe-chat-database ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 7, 2024 10:54am
lobe-chat-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 7, 2024 10:54am

Copy link

vercel bot commented Dec 7, 2024

@cy948 is attempting to deploy a commit to the LobeChat Community Team on Vercel.

A member of the Team first needs to authorize it.

@lobehubbot
Copy link
Member

👍 @cy948

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

Copy link

codecov bot commented Dec 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.07%. Comparing base (a502c17) to head (302ef8d).
Report is 18 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##             main    #4919     +/-   ##
=========================================
  Coverage   92.07%   92.07%             
=========================================
  Files         527      527             
  Lines       40050    40060     +10     
  Branches     2489     3516   +1027     
=========================================
+ Hits        36877    36887     +10     
  Misses       3173     3173             
Flag Coverage Δ
app 92.07% <ø> (+<0.01%) ⬆️
server 98.12% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cy948 cy948 force-pushed the fix/nextauth-createUser branch from a8b3f66 to 302ef8d Compare December 7, 2024 10:48
@cy948 cy948 marked this pull request as ready for review December 7, 2024 11:01
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. 🐛 Bug Something isn't working | 缺陷 labels Dec 7, 2024
@arvinxx arvinxx changed the title 🐛 fix: Wrong email linking in next-auth db adapter 🐛 fix: fix wrong email linking in next-auth db adapter Dec 9, 2024
@arvinxx arvinxx merged commit af45a28 into lobehub:main Dec 9, 2024
8 checks passed
@lobehubbot
Copy link
Member

❤️ Great PR @cy948 ❤️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.
项目的成长离不开用户反馈和贡献,感谢您的贡献! 如果您对 LobeHub 开发者社区感兴趣,请加入我们的 discord,然后私信 @arvinxx@canisminor1990。他们会邀请您加入我们的私密开发者频道。我们将会讨论关于 Lobe Chat 的开发,分享和讨论全球范围内的 AI 消息。

github-actions bot pushed a commit that referenced this pull request Dec 9, 2024
### [Version&nbsp;1.36.5](v1.36.4...v1.36.5)
<sup>Released on **2024-12-09**</sup>

#### 🐛 Bug Fixes

- **misc**: Fix wrong email linking in next-auth db adapter.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **misc**: Fix wrong email linking in next-auth db adapter, closes [#4919](#4919) ([af45a28](af45a28))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@lobehubbot
Copy link
Member

🎉 This PR is included in version 1.36.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit to bentwnghk/lobe-chat that referenced this pull request Dec 9, 2024
### [Version&nbsp;1.78.3](v1.78.2...v1.78.3)
<sup>Released on **2024-12-09**</sup>

#### 🐛 Bug Fixes

- **misc**: Fix wrong email linking in next-auth db adapter.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **misc**: Fix wrong email linking in next-auth db adapter, closes [lobehub#4919](https://github.com/bentwnghk/lobe-chat/issues/4919) ([af45a28](af45a28))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@cy948 cy948 mentioned this pull request Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 released size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] 使用 Casdoor 部署服务器版本,登录身份错乱
3 participants