Community discussions

MikroTik App
 
aysan
newbie
Topic Author
Posts: 34
Joined: Wed Aug 18, 2010 11:40 am

Hotspot Registration form and bypass hotspot login page

Wed Jan 12, 2011 5:29 pm

Hi Guys,
I have a problem with hospot login page.
I installed wireless system to a hotel.
On the login page, there is two form. One for registered user which is reguler mikrotik hotspot login.html page. Other is for new users registration page. Registration page works in a local server written with php. After registration script gives a username and insert to UM. And then user should enter username to login page to access internet. Everting works fine until here.
What I want to do is, after registration user should access to internet with a single click.
How can I redirect user to login page automoticly without enter username again into login page?
Thnx...
You do not have the required permissions to view the files attached to this post.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Hotspot Registration form and bypass hotspot login page

Wed Jan 12, 2011 5:44 pm

From the external server after sign up have the user go to the router's /login servlet, passing on two parameters named 'username' and 'password', with the appropriate values. That is equivalent to filling out the login form and clicking the submit button and will log the user in automatically.

A link such as this would be appropriate:
<a href="http://router.dns.name/login?username=MyUserName&password=MyPassword">Click here to login</a>
You could also automatically redirect the user to that URL via meta refreshes or JavaScript so that it happens automatically without even a single click after the account has been created.
 
aysan
newbie
Topic Author
Posts: 34
Joined: Wed Aug 18, 2010 11:40 am

Re: Hotspot Registration form and bypass hotspot login page

Wed Jan 12, 2011 6:08 pm

Hi fewi,
Thank you for your quick answer.
I tried <a href="http://router.dns.name/login?username=M ... ord">Click here to login</a> but it gives me following error.
I reset hotspot but nothing changed. I also tested firefox and other notebooks.

web browser did not send challenge response (try again, enable JavaScript)
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Hotspot Registration form and bypass hotspot login page

Wed Jan 12, 2011 6:16 pm

Either change to HTTP-PAP (over HTTPS, probably), or look at the default HTML pages to see how they integrate CHAP and the md5.js script.
 
aysan
newbie
Topic Author
Posts: 34
Joined: Wed Aug 18, 2010 11:40 am

Re: Hotspot Registration form and bypass hotspot login page

Thu Jan 13, 2011 4:29 pm

Hi again,
I changed to HTTP-PAP and solved my problem.
Thank you...
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Hotspot Registration form and bypass hotspot login page

Thu Jan 13, 2011 4:39 pm

Be aware that PAP sends credentials in clear text. That may or may not be appropriate for your situation. Ideally use an SSL certificate on the router to protect the clear text password between all endpoints.
 
ugursahin
just joined
Posts: 1
Joined: Thu May 24, 2018 10:08 am

Re: Hotspot Registration form and bypass hotspot login page

Thu May 24, 2018 10:16 am

Thanks you

Who is online

Users browsing this forum: No registered users and 11 guests