hello, I see that kratos has these err messages be...
# talk-kratos
s
hello, I see that kratos has these err messages below:
Copy code
A valid session was detected and thus login is not possible. Did you forget to set `?refresh=true`?
A valid session was detected and thus recovery is not possible.
A valid session was detected and thus registration is not possible.
Noted that with the first one, I see that we can overcome by adding
?refresh=true
parameter, but we cannot overcome for the second and third case. My questions are: 1. For the second and third case, the error message means that there is a valid cookie stored at the client side, therefore Ory detects that and blocks? 2. In case we want to solve this, we need to clear Ory cookie at the client side?
m
Hello Lan, You can revoke the session and let the user log in again/register again. Not sure how the 3rd case would occur IRL. I think in general if they already have a valid session you could redirect them to the app starting page? Or is there a particular reason why you would clear the cookie?
s
hi @magnificent-energy-493, do we have any utility to check that cookie is still valid? just because I see completely 2 different cases with our web app: • case 1: have cookie, then it's redirected to internal web • case 2: have cookie, but not redirected to internal web. However, when opening forget password link, it raised error above
hi @magnificent-energy-493, Seem it's a bug: • Log into web app, got cookie • Logout, cookie is still in browser (just because I set persistent for my session cookie) • when I open recovery link, it raises error "A valid session was detected and thus recovery is not possible." --> bug, because session cookie is available, but it's not valid yet (because I did logout in step #2 above) What do you think?
m
I see so basically when you have a persistent cookie, the recovery link will always fail?
That sounds like a bug or at least like unintended behaviour / edge case that needs to be adressed. Would you be so kind and open an issue for it? 🙏
s
ok Vincent, let I open a bug ... and I'll find sometime in weekend to fix it
is there any huge change between v0.7 and v0.8, @magnificent-energy-493? I'm still in version 0.7 ...
m
yes there was quite a lot of changes ! https://github.com/ory/kratos/releases/tag/v0.8.0-alpha.1
If it is not too much to ask, you could try to reproduce it on v.0.8 before opening the issue. Let me know if you dont get around to it then I can do it sometime this week.
s
thanks so much, @magnificent-energy-493, I'll try to reproduce it on v0.8 first
https://github.com/ory/kratos/releases/tag/v0.8.0-alpha.1 --> this document have first section (from "On this special occasion ..." to section "Breaking changes") is tripled in content, @magnificent-energy-493
m
Right, thanks for pointing it out. The changelog is autogenerated so probably some quirk in the script. I will check if it is something obvious.