memos icon indicating copy to clipboard operation
memos copied to clipboard

Login auth failed

Open molast opened this issue 1 year ago • 7 comments

Describe the bug

The web project is run locally, and the server is on the cloud server, which causes the cookie acquisition to fail when logging in. this situation does not exist in Windows, but exists in Mac. The same situation occurs if the go server and the web server run on different OS The SignIn() method request is successful, and the response's Set-cookie exists, but the GetAuthStatus() method request fails, and the Set-cookie is gone. image

Steps to reproduce

  1. open memos login page
  2. click the button of login

The version of Memos you're using

0.20.0

Screenshots or additional context

No response

molast avatar Feb 28 '24 09:02 molast

Could you provide some logs of the web requests?

boojack avatar Feb 28 '24 16:02 boojack

你能提供一些 Web 请求的日志吗?你能提供一些 Web 请求的日志吗?

我现在确定了memos无法登录和1Panel无关,在重装系统后正常运行,直到我刚才重启服务器,又无法登录了,显示“user not found”,我现在怀疑是memos本身的问题。

refrain1128 avatar Mar 03 '24 07:03 refrain1128

Issue is not in English. It has been translated automatically.


Can you provide some logs of web requests? Can you provide some logs of web requests?

I am now sure that the inability to log in memos has nothing to do with 1Panel. After reinstalling the system, it ran normally. Until I just restarted the server, I could not log in again and displayed "user not found". I now suspect that it is a problem with memos itself.

Issues-translate-bot avatar Mar 03 '24 07:03 Issues-translate-bot

你能提供一些 Web 请求的日志吗?

memos-20240303160239.log

refrain1128 avatar Mar 03 '24 08:03 refrain1128

Issue is not in English. It has been translated automatically.


Can you provide some logs of web requests?

memos-20240303160239.log

Issues-translate-bot avatar Mar 03 '24 08:03 Issues-translate-bot

Could you provide some logs of the web requests?你能提供一些 Web 请求的日志吗? memos无法登录2 我终于发现问题的原因了😭 详情见尝试通过Set-Cookie标头设置Cookie时被阻止,因为它具有“Secure“属性,但未通过安全连接发送 原因是设置了secure属性的cookie只能用https协议发送给服务器,难怪我用https可以登录 文章提供了解决方法为:去掉secure属性 请问怎么去掉secure属性?这是我浏览器的问题还是memos自身的bug?

refrain1128 avatar Mar 04 '24 07:03 refrain1128

Issue is not in English. It has been translated automatically.


Could you provide some logs of the web requests? Can you provide some logs of the web requests? memos cannot log in 2 I finally found the cause of the problem😭 For details, see Attempting to set a cookie via the Set-Cookie header was blocked because it had the "Secure" attribute but was not sent over a secure connection The reason is that cookies with the secure attribute set can only be sent to the server using https protocol. No wonder I can log in using https. The article provides a solution: remove the secure attribute How can I remove the secure attribute? Is this a problem with my browser or a bug in memos itself?

Issues-translate-bot avatar Mar 04 '24 07:03 Issues-translate-bot

Could you provide some logs of the web requests?你能提供一些 Web 请求的日志吗?

在添加证书之前没有遇到这种无法登录的情况,添加证书之后用http就无法登录了,即使我不使用证书后也无法登录。 而且由于国内的域名不备案无法在公网使用https,现在导致我现在只能在局域网用https使用memos,公网无法使用。 希望尽快解决这个问题。

refrain1128 avatar Mar 06 '24 04:03 refrain1128

Issue is not in English. It has been translated automatically.


Could you provide some logs of the web requests? Can you provide some logs of the web requests?

I didn't encounter this kind of inability to log in before adding the certificate. After adding the certificate, I couldn't log in using http. Even if I didn't use the certificate, I couldn't log in. And because the domestic domain name is not registered and cannot use https on the public network, now I can only use https on the local area network to use memos, and cannot use it on the public network. Hope this issue is resolved soon.

Issues-translate-bot avatar Mar 06 '24 04:03 Issues-translate-bot

更新0.20.1后http可以正常登录了,不知道是bug解决了还是暂时性的

refrain1128 avatar Mar 07 '24 12:03 refrain1128

Issue is not in English. It has been translated automatically.


After updating to 0.20.1, http can log in normally. I don’t know if the bug has been resolved or it is temporary.

Issues-translate-bot avatar Mar 07 '24 12:03 Issues-translate-bot