cookies

Hello everyone good afternoon to come through to ask your help to create a script to remove cookies from a User every time he makes loguin.
thank you

Cookies are stored in the users PC, the Router can’t remove them. Did I understand your question correctly ?

If the user has explicitly asked the router when they log out, THEN the router could remove the login cookie by setting that cookie with new expiration time - in the past.

So I guess the real question is how to make router send such a cookie on log out (unless I too am misunderstanding the question).

would like to create a script to remove the cookies to the User’s hotspot
ip
hotspot
cookies
understand

ip hotspot cookie remove [find]

this scrit remove for all cookie

Note that this removes cookies on the router side, not on the user side. Users will still have their cookie. It’s just that the router will keep ignoring it until it naturally expires.

yes this is my problem too

i want to delete the cookies just for the trail users

ip hotspot cookie remove [find]

\

Note that all trail users begin with ( T- )

when the router delete their cookies they will see the login page

i want to delete the cookies just for the trail users

Why not just set the desired “Trial uptime reset” appropriately, coupled with the appropriate cookie lifetime in the trial user profile?

Note that all trail users begin with ( T- )

sigh <
If you insist…

/ip hotspot cookie remove [find user~"^T\\-"]

Thank you dear

:laughing:
boen_R
Your too kind.

Im just testing and i removed the use of cookie, just left MAC cookie and the behaviour looks like this:

-if user disconnects (shutting down WiFi) then, the next time he conects (if cookie is still valid) it will be logged in automatically trough cookie, but if user hits the logout button on hotspot page, then cookie is deleted and next time he has to put his credentials

maybe is the inverted case that you were looking for

but for my case it seems it will fit perfectly without the need of scripting

I have same problem. I want to clear cookies when user click logout button, while loging out clear also the browser cookies.