Community discussions

 
iorijanete
just joined
Topic Author
Posts: 5
Joined: Sat Aug 04, 2012 2:18 pm

cookies

Sat Aug 04, 2012 4:30 pm

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
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 24206
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: cookies

Mon Aug 06, 2012 10:04 am

Cookies are stored in the users PC, the Router can't remove them. Did I understand your question correctly ?
No answer to your question? How to write posts
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2411
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: cookies

Mon Aug 06, 2012 12:54 pm

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).
PEAR2_Net_RouterOS(1.0.0b6) - My API client in PHP
(Rate my posts? If you want... no pressure...)
 
iorijanete
just joined
Topic Author
Posts: 5
Joined: Sat Aug 04, 2012 2:18 pm

Re: cookies

Tue Aug 07, 2012 5:52 am

would like to create a script to remove the cookies to the User's hotspot
ip
hotspot
cookies
understand
 
User avatar
c0d3rSh3ll
Long time Member
Long time Member
Posts: 558
Joined: Mon Jul 25, 2011 9:42 pm
Location: [admin@Chile] >

Re: cookies

Tue Aug 07, 2012 10:30 am

ip hotspot cookie remove [find]
this scrit remove for all cookie
nothing
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2411
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: cookies

Tue Aug 07, 2012 11:39 am

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.
PEAR2_Net_RouterOS(1.0.0b6) - My API client in PHP
(Rate my posts? If you want... no pressure...)
 
mostafaalsaady
Frequent Visitor
Frequent Visitor
Posts: 50
Joined: Fri Mar 14, 2008 7:39 pm
Location: IRAQ

Re: cookies

Tue Jun 30, 2015 10:02 pm

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
LearnING MikrotiK
MTCNA - MTCWE - MTCRE - MTCTCE
 
User avatar
boen_robot
Forum Guru
Forum Guru
Posts: 2411
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: cookies

Wed Jul 01, 2015 12:23 pm

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\\-"]
PEAR2_Net_RouterOS(1.0.0b6) - My API client in PHP
(Rate my posts? If you want... no pressure...)
 
mostafaalsaady
Frequent Visitor
Frequent Visitor
Posts: 50
Joined: Fri Mar 14, 2008 7:39 pm
Location: IRAQ

Re: cookies

Wed Jul 01, 2015 4:12 pm

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
LearnING MikrotiK
MTCNA - MTCWE - MTCRE - MTCTCE
 
tchus
Member Candidate
Member Candidate
Posts: 111
Joined: Tue Jan 25, 2011 12:08 am

Re: cookies

Wed Jul 08, 2015 7:00 am

:lol:
boen_R
Your too kind.
 
saenito
just joined
Posts: 19
Joined: Wed Aug 22, 2018 3:37 am

Re: cookies

Wed Oct 31, 2018 9:12 pm

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

Who is online

Users browsing this forum: No registered users and 10 guests