You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It actually creates a cookie with the domain: .domain.tld attribute.
BUT when I clear the session with await clearUserSession(event), it actually creates a new cookie, with the domain: domain.tld attribute, and sets its value blank.
So I'm not disconnected. There's more : if I click "logout" from a subdomain, it creates another empty cookie with domain: sub.domain.tld, so the subdomain is logged out, but the others are not.
I see from h3 code
that clearSession can take some Partial<SessionConfig> as well and use it when setting the new empty session cookie.
I see from nuxt-auth-utils code that clearUserSession does not take any config parameter, making it impossible to reuse the config used in setUserSession to pass it to the setCookie called from h3 ?
I'm still a learner, but do you think it would be possible to simply change the clearUserSession this way so I can pass the same cookie options I used with setUserSession, and the right cookie would be emptied ?
Again, I'm just trying to start from my problem and reading code from repo to repo, to see how I can fix it, so I'm not sure at all.
Still, if you can confirm my guess is right, it would be an honor to make my first PR to this amazing module.
Thanks A LOT for all your work, it's a real pleasure every day to use the amazing stuff you create ❤️
The text was updated successfully, but these errors were encountered:
It's done. Thanks for the info related to the runtime config, I completely forgot this point.
I think I'm gonna use this way instead of inline config. Sad I won't be able to use my PR 😆
Hello there !
I created a session with a domain starting with a
dot
so I can get session on subdomains as well.It actually creates a cookie with the
domain: .domain.tld
attribute.BUT when I clear the session with
await clearUserSession(event)
, it actually creates a new cookie, with thedomain: domain.tld
attribute, and sets its value blank.So I'm not disconnected. There's more : if I click "logout" from a subdomain, it creates another empty cookie with
domain: sub.domain.tld
, so the subdomain is logged out, but the others are not.I see from h3 code
that
clearSession
can take somePartial<SessionConfig>
as well and use it when setting the new empty session cookie.I see from nuxt-auth-utils code that
clearUserSession
does not take anyconfig
parameter, making it impossible to reuse the config used insetUserSession
to pass it to the setCookie called from h3 ?I'm still a learner, but do you think it would be possible to simply change the
clearUserSession
this way so I can pass the same cookie options I used withsetUserSession
, and the right cookie would be emptied ?Again, I'm just trying to start from my problem and reading code from repo to repo, to see how I can fix it, so I'm not sure at all.
Still, if you can confirm my guess is right, it would be an honor to make my first PR to this amazing module.
Thanks A LOT for all your work, it's a real pleasure every day to use the amazing stuff you create ❤️
The text was updated successfully, but these errors were encountered: