coova / coova-chilli

CoovaChilli is an open-source software access controller for captive portal hotspots.
Other
518 stars 260 forks source link

How to begin making custom login pages/processes? #354

Open DavSanchez opened 7 years ago

DavSanchez commented 7 years ago

Hello! I have installed CoovaChilli on a Raspberry Pi and it works great!

I am looking to make a custom login page in which you don't have to authenticate traditionally, typing an user & password, but rather providing some data via your browser (say, location and timestamps for some statistics), renewing the session every 30 minutes when new data is provided.

The thing is, I don't know were to begin to control the login process, or even to make just another login page from scratch (where to send the user & password data, for example). I have been looking at the man pages from the website, the mailing list, the scripts and config files, the chilli/www directory to see how the splash pages are made and examples from other sources as well (users from here, drupal pages to use with CoovaChilli, etc), it seems that the files chilliController.js and ChilliLibrary.js are needed, but I need to deactivate uamsecret for them to work properly? Won't I break the authentication process or any other thing if I disable uamsecret?

I'm not that code-savvy yet, so I'm having problems to completely wrap my head around the way it works just by looking at the scripts and the JS and .chi files. I'm doing more research and trying to work with what I currently have.

Any other source I could check or any advice on where should I begin to work? Thanks in advance!

Ankoul commented 7 years ago

Hi, I'm looking for the same thing. After some days of trying I finally did coovachilli works on raspberry pi. Now I need to change your login page to some social login as facebook or google +. @DavSanchez, did you find a way of how to do it?

jobezic commented 7 years ago

Basically you can set any page as login page (also a fb page).. you have to deal with chilliController.js and ChilliLibrary.js in order to allow users and sessions.

DavSanchez commented 7 years ago

Hello @Ankoul,

I have been working on a Node.js app to serve the landing page and give the credentials to the clients in order to be given internet access from CoovaChilli. It uses ChilliLibrary.js for the login process management. You can check my repository if you want to see what I have been doing. It's still incomplete with some problems and without a useful readme file yet, but it gives internet access correctly with credentials given from a server. Feedback appreciated!

Ankoul commented 7 years ago

Hi @DavSanchez , i will be glad to check your project, thanks. I did what @pinkra said and played a little with chilliController. After some troubles i finally did it works, but for sure was not the way it should be. I had to do some "not so sexy things" to be able to get it working.

reigelgallarde commented 7 years ago

Hello @pinkra, can you provide a hint on how to deal with chilliController.js and ChilliLibrary.js in order to allow users and sessions? any links I can read, would be fine. I've been searching google for hours now and can't seem to find a solution...

jobezic commented 6 years ago

I'm going to find some developers who want to join this project https://github.com/Geenkle/wihan

Sajeyks commented 1 year ago

Hello @PINKRA, can you provide a hint on how to deal with chilliController.js and ChilliLibrary.js in order to allow users and sessions? any links I can read would be fine. I've been searching google for hours now and can't seem to find a solution...

Hey @reigelgallarde did you find any reading materials?