Community discussions

MikroTik App
 
ik3umt
Member Candidate
Member Candidate
Topic Author
Posts: 295
Joined: Tue Jul 08, 2014 3:58 pm

HotSpot with userman as login page

Tue Apr 16, 2019 5:35 pm

What I'm trying to do: give a wireless user a HotSpot login page that is http://routerboard_ip/user/signup , allowing user to self-register to system once signup form is filled with e-mail, phone, user, pass etc.
How to achieve this ?
Hotspot automatically bring you to /hotspot/login.html
Any hint please ?
 
ik3umt
Member Candidate
Member Candidate
Topic Author
Posts: 295
Joined: Tue Jul 08, 2014 3:58 pm

Re: HotSpot with userman as login page

Wed Apr 17, 2019 9:37 am

Too difficult or too stupid question ? :shock:
 
User avatar
pcunite
Forum Guru
Forum Guru
Posts: 1345
Joined: Sat May 25, 2013 5:13 am
Location: USA

Re: HotSpot with userman as login page

Wed Apr 17, 2019 5:36 pm

I'm doing this.

User hits the Hotspot. I redirect them immediately to an external Linux server running PHP. That redirect, is a POST containing their MAC, IP, etc. The page their redirected to now asks for their email address. When they submit their email, I post them back to the HotSpot server using a generic email and password (I share it for everyone) which gives them internet access.

You can an example here.
 
ik3umt
Member Candidate
Member Candidate
Topic Author
Posts: 295
Joined: Tue Jul 08, 2014 3:58 pm

Re: HotSpot with userman as login page

Thu Apr 18, 2019 10:43 am

Ok, but it would be nice to do it all inside the same routerboard machine.

Perhaps a possible workaround:

Add to hotspot login page a "click here to signup" link to /routerip/user/signup (easy)

Redirect user (I don't know if possible, and how) after signup form is filled, back to hotspot login page, where he enters the chosen credentials.

Any idea how ?
 
User avatar
pcunite
Forum Guru
Forum Guru
Posts: 1345
Joined: Sat May 25, 2013 5:13 am
Location: USA

Re: HotSpot with userman as login page

Thu Apr 18, 2019 3:06 pm

it would be nice to do it all inside the same routerboard machine.

Yes, it would. But there is no server side scripting on the MikroTik. You can do it all now on the MikroTik, but you can not process the data the user gives you. It's not about simply logging them in, don't you want to react to the data they give?
 
ik3umt
Member Candidate
Member Candidate
Topic Author
Posts: 295
Joined: Tue Jul 08, 2014 3:58 pm

Re: HotSpot with userman as login page

Thu Apr 18, 2019 4:53 pm

Not so important to manage user input data for now, self-signup is enough, so:

Hotspot first login obviously works, I've added a link to userman self-signup page (signup enabled on userman settings)
then self-signup of users via userman works.
Entering credentials generated by userman into hotspot page works (userman is connected to hotspot: https://wiki.mikrotik.com/wiki/User_Man ... ot_Example)
The only missing step is to redirect automatically user to hotspot login page after self-signup is completed. Actually he is redirected to userman login page instead (http://routerip/user).

Does anyone know if it is possible and how ??

Userman wiki "Used files" says:
redirect.html - used to redirect user to User page after successful assignment of free profile, which does not require payment. It is recommended not to modify this file

Not found so useful....
 
User avatar
pcunite
Forum Guru
Forum Guru
Posts: 1345
Joined: Sat May 25, 2013 5:13 am
Location: USA

Re: HotSpot with userman as login page

Thu Apr 18, 2019 7:31 pm

Just add a meta redirect tag at the top of the final landing page in the flow. There is also dst. Read here, it was very helpful to me.
 
ik3umt
Member Candidate
Member Candidate
Topic Author
Posts: 295
Joined: Tue Jul 08, 2014 3:58 pm

Re: HotSpot with userman as login page

Fri Apr 19, 2019 6:14 pm

I'll take a look....
It seems , however, once signup is done, you are immediately redirected to http://routerip/user that is a page you cannot find (to be edited) among files .... (am I wrong ?)
 
User avatar
pcunite
Forum Guru
Forum Guru
Posts: 1345
Joined: Sat May 25, 2013 5:13 am
Location: USA

Re: HotSpot with userman as login page

Fri Apr 19, 2019 7:10 pm

It seems , however, once signup is done, you are immediately redirected to http://routerip/user that is a page you cannot find (to be edited) among files .... (am I wrong ?)

Yes, sorry at the moment I'm out of pocket. But, I just wanted to give you confidence it can be done. There is a flow, I think it's:

login.html
redirect.html
alogin.html
status.html
 
ronylove
newbie
Posts: 28
Joined: Fri Aug 10, 2018 6:33 pm

Re: HotSpot with userman as login page

Thu Jul 18, 2019 10:22 pm

What I'm trying to do: give a wireless user a HotSpot login page that is http://routerboard_ip/user/signup , allowing user to self-register to system once signup form is filled with e-mail, phone, user, pass etc.
How to achieve this ?
Hotspot automatically bring you to /hotspot/login.html
Any hint please ?
Hola Estimado.
Te comento que yo lo hice de esta manera.
- En el login de hotspot , coloque un boton que me redirija a http://routerboard_ip/user/signup
- El usuario llena el registro y crea la cuenta.
- En el archivo signup.html que es del usermanager agregue una linea que haga de link al dominio de tu hotspot. ( Ejm: prueba.com.bo )
- Obviamente debes habilitar en el Walled garden la IP de tu RB ( routerboard_ip )
- y listo. haz la prueba y comentas.
Gracias

Who is online

Users browsing this forum: lurker888, patrikg and 113 guests