lobehub/lobe-chat

[Bug] lobe-chat 在使用auth0时,即使在auth0上删除该用户,只要用户不删除浏览器记录仍能正常使用 #1661

Yanyutin753 posted onGitHub

💻 系统环境

Windows

📦 部署环境

Official Preview

🌐 浏览器

Chrome

🐛 问题描述

lobe-chat 在使用auth0时,即使在auth0上删除该用户,只要用户不删除浏览器记录仍能正常使用!!!

在一些极其特别的情况,这个问题应该要得到解决

🚦 期望结果

希望能定时自动刷新登录结果

📷 复现步骤

我测试,登录了auth0后能正常使用,然后我在auth0控制台删除该用户,该用户在不删除浏览器记录的情况下仍能正常使用

📝 补充信息

希望作者能尽快解决,感谢大佬们的付出!!!


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


💻 System environment

Windows

📦 Deployment environment

Official Preview

🌐 Browser

Chrome

🐛 Problem description

lobe-chat When using auth0, even if the user is deleted on auth0, it can still be used normally as long as the user does not delete the browser record! ! !

In some extremely special cases, this problem should be solved

🚦 Expected results

I hope that the login results can be automatically refreshed regularly.

📷 Steps to reproduce

I tested that it can be used normally after logging in to auth0. Then I deleted the user in the auth0 console. The user can still be used normally without deleting the browser record.

📝 Supplementary information

I hope the author can solve it as soon as possible. Thank you for your efforts! ! !

posted by lobehubbot 12 months ago

👀 @Yanyutin753

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

posted by lobehubbot 12 months ago

你搜下 issue ,好像之前有类似的问题

posted by arvinxx 12 months ago

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


If you search for issue, it seems that there have been similar problems before.

posted by lobehubbot 12 months ago

看到了 是不是没什么好的解决办法🥹🥹🥹

posted by Yanyutin753 12 months ago

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


See, is there no good solution? 🥹🥹🥹

posted by lobehubbot 12 months ago

大佬 这个有解决方案嘛

posted by Yanyutin753 12 months ago

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


Sir, is there a solution for this?

posted by lobehubbot 12 months ago

@Yanyutin753 我对 auth0 不是很了解,可能需要 @cy948 来帮忙看下

posted by arvinxx 12 months ago

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


@Yanyutin753 I don’t know much about auth0. I may need @cy948 to help me check it out.

posted by lobehubbot 12 months ago

未来版本引入后端数据库后会实现远程下线功能。敬请期待。

posted by cy948 12 months ago

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


The remote offline function will be implemented after the back-end database is introduced in future versions. Stay tuned.

posted by lobehubbot 12 months ago

好 因为开auth0,我想开github,google认证,方便我同学使用,然后自己写了一个插件能监控。但是发现就算删除用户,用户还是能用,后面想想还是先不用auth0了,感觉大佬们的付出,期待新功能!!!

posted by Yanyutin753 12 months ago

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


Good. Because auth0 is enabled, I want to open github and google authentication to facilitate my classmates’ use, and then I wrote a plug-in to monitor it. But I found that even if I delete the user, the user can still use it. I think about it later and don’t need auth0 for now. I feel the efforts of the big guys and I look forward to the new features! ! !

posted by lobehubbot 12 months ago

@Yanyutin753 当前的会话管理不依赖数据库,所以不能进行用户管理。等 1.0 版本支持后端数据库后会一并支持这个功能。如果你很迫切需要用户管理功能,我推荐你在你的二开版本中为 NextAuth 接入 Database Adapter。NextAuth 配置位置:/src/app/api/auth/next-auth.tsAuthjs 相关文档。接入示例:

export default NextAuth({
  // 保留其他设置,并新增以下配置
+  adapter: SupabaseAdapter({
+    url: process.env.NEXT_PUBLIC_SUPABASE_URL,
+    secret: process.env.SUPABASE_SERVICE_ROLE_KEY,
+  }),
+  session: {
+    strategy: ENABLE_DATABASE ? 'database' : 'jwt',
+  },
  // ...
})
posted by cy948 12 months ago

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


@Yanyutin753 The current session management does not rely on the database, so user management is not possible. This feature will be supported after version 1.0 supports the back-end database. If you urgently need user management functionality, I recommend you to connect the Database Adapter for NextAuth in your second version. NextAuth configuration location: /src/app/api/auth/next-auth.ts, Authjs related documents. Access example:

export default NextAuth({
  // Keep other settings and add the following configuration
+ adapter: SupabaseAdapter({
+ url: process.env.NEXT_PUBLIC_SUPABASE_URL,
+ secret: process.env.SUPABASE_SERVICE_ROLE_KEY,
+ }),
+ session: {
+ strategy: ENABLE_DATABASE ? 'database' : 'jwt',
+ },
  // ...
})
posted by lobehubbot 12 months ago

我想开github,google认证,方便我同学使用,然后自己写了一个插件能监控。但是发现就算删除用户,用户还是能用,后面想想还是先不用auth0了

@Yanyutin753 在 0.154.0 我们支持了使用 Clerk 作为 Auth 方案,应该能够满足你的诉求了。

posted by arvinxx 10 months ago

✅ @Yanyutin753

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

posted by lobehubbot 10 months ago

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


I want to open github and get Google certification to make it easier for my classmates to use, and then I wrote a plug-in to monitor it. But I found that even if I delete the user, the user can still use it. I will think about it later and don’t use auth0 for now.

@Yanyutin753 In 0.154.0 we support the use of Clerk as the Auth solution, which should be able to meet your requirements.

posted by lobehubbot 10 months ago

github action 打包报错了 我刚刚看了一下

posted by Yanyutin753 10 months ago

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


The github action package reported an error. I just took a look.

posted by lobehubbot 10 months ago

很强了,感谢大佬们的付出!

posted by Yanyutin753 10 months ago

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


It’s very strong, thank you guys for your hard work!

posted by lobehubbot 10 months ago

我想开github,google认证,方便我同学使用,然后自己写了一个插件能监控。但是发现就算删除用户,用户还是能用,后面想想还是先不用auth0了

@Yanyutin753 在 0.154.0 我们支持了使用 Clerk 作为 Auth 方案,应该能够满足你的诉求了。

#2432

posted by Yanyutin753 10 months ago

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


I want to open github and get Google certification to make it easier for my classmates to use, and then I wrote a plug-in to monitor it. But I found that even if I delete the user, the user can still use it. I will think about it later and don’t use auth0 for now.

@Yanyutin753 In 0.154.0 we support the use of Clerk as the Auth solution, which should be able to meet your requirements.

#2432

posted by lobehubbot 10 months ago

我在使用GitHub的时候依然遇到这个问题,退出登录了但是用户图标还在,而且还能进行对话

posted by xingpingcn 10 months ago

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


I still encounter this problem when using GitHub. I log out but the user icon is still there and I can still have conversations.

posted by lobehubbot 10 months ago

Fund this Issue

$0.00
Funded

Pull requests