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 wechat login error: make next-auth compatible for text/plain response type #6585

Open
wants to merge 35 commits into
base: main
Choose a base branch
from

Conversation

xiangnanscu
Copy link
Contributor

💻 变更类型 | Change Type

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

🔀 变更说明 | Description of Change

fix as discussed in #6131

📝 补充信息 | Additional Information

Copy link

vercel bot commented Feb 27, 2025

@xiangnanscu is attempting to deploy a commit to the LobeChat Desktop Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. 🐛 Bug Something isn't working | 缺陷 labels Feb 27, 2025
@lobehubbot
Copy link
Member

👍 @xiangnanscu

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 Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.61%. Comparing base (55b5416) to head (f7a36ee).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6585   +/-   ##
=======================================
  Coverage   91.61%   91.61%           
=======================================
  Files         699      699           
  Lines       65856    65856           
  Branches     4659     4659           
=======================================
  Hits        60336    60336           
  Misses       5520     5520           
Flag Coverage Δ
app 91.61% <ø> (ø)
server 97.57% <ø> (ø)

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.

@arvinxx
Copy link
Contributor

arvinxx commented Mar 3, 2025

我看 https://github.com/nextauthjs/next-auth/blob/main/packages/core/src/providers/wechat.ts#L104-L117 这里已经有了。为啥还需要在 LobeChat 里加一道?

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I've seen https://github.com/nextauthjs/next-auth/blob/main/packages/core/src/providers/wechat.ts#L104-L117 already available here. Why do you still need to add a bun in LobeChat?

@xiangnanscu
Copy link
Contributor Author

@arvinxx 为了修复无法使用微信扫码登录的问题.见:
nextauthjs/next-auth#12661
#6131

@arvinxx
Copy link
Contributor

arvinxx commented Mar 3, 2025

@xiangnanscu 如果 next-auth 合并了是不是不需要我们这边再加了?

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@xiangnanscu If next-auth is merged, do we need to add it here?

@xiangnanscu
Copy link
Contributor Author

@arvinxx 那边速度太慢了. 而且那个PR没有处理style, 登录的时候不会显示微信图标, 很丑

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@arvinxx's speed is too slow. And that PR does not process style, and the WeChat icon will not be displayed when logging in, which is very ugly

@@ -9,7 +9,7 @@ const provider = {
clientId: process.env.AUTH_WECHAT_ID,
clientSecret: process.env.AUTH_WECHAT_SECRET,
platformType: 'WebsiteApp',
profile: (profile) => {
profile: (profile: any) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的 Profile 是可以配置 type 的,不用指定成 any,你看看是不是没配置?

@arvinxx
Copy link
Contributor

arvinxx commented Mar 5, 2025

另外需要补一个演示视频,看下整个流程是什么样的。

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


In addition, you need to add a demonstration video to see what the entire process looks like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷 size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants