remark42 icon indicating copy to clipboard operation
remark42 copied to clipboard

Problematic logout doesn't show errors in the UI

Open paskal opened this issue 3 years ago • 3 comments

I run remark42 like that: ./remark42.darwin-arm64 server --secret=12345 --url=http://127.0.0.1:8080.

If I was logged in before running that version (with no auth providers) I see a normal comment screen:

image

If I push the "log out" button, http://127.0.0.1:8080/auth/logout?site=remark request is made with status code 400 which has the following answer:

{
    "error": "providers not defined"
}

The interface shows nothing. In the console, I see the following:

image

Erroring code:

image

paskal avatar Jul 31 '22 21:07 paskal

I think it could be composed with https://github.com/umputun/remark42/issues/1456 the point is the same. we do not support 0 auth providers.

akellbl4 avatar Aug 01 '22 15:08 akellbl4

The scenario I described is the most straightforward way of producing the problem. The real issue is the lack of proper error handling on the logout button push in the frontend.

paskal avatar Aug 01 '22 19:08 paskal

Maybe it is not only about logout btw, but handling errors on requests to server in general. I know we handle most of errors but probably we have several cases where we don't.

The specific of logout made me think of this bizarre case, because severity of described case is going to 0%.

akellbl4 avatar Aug 10 '22 17:08 akellbl4