Cisco Meraki Captive Portal with Social Passport support using the ExCAP API. This for demonstration purposes and comes with no guarantee or official support
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Cisco Meraki ExCap Splash Page Server /w Social OAuth using Passport


This NodeJS applications demonstrates how the ExCap API can be used for delivering a custom Captive Portal / Splash Page with Cisco Meraki access points.

More info about the ExCap API:

Complete write-up for this application can be found here:

###Written by Cory Guynn, 2016


##Configure the Cisco Meraki Wi-Fi SSID

  • Logon to the Meraki Dashboard

  • Dashboard --> Wireless --> Access Control: (select SSID name from list)

  • Configure an SSID with a Sign-on or Click-through splash page.

  • Scroll down the page and enable the "Walled Garden". Enter the IP address of your web server, to provide access to your splash page content prior to authentication. Enter any additional IP addresses for hosted content such as social websites (OAuth), style sheets, images, terms of service, etc in this section as well.

##Configure the Splash Page

  • Dashboard --> Wireless --> Configure --> Splash Page Select: Use custom URL

  • Enter the URL for the splash page.

Sign-on w/ RADIUS

Click-through w/ Social Passport


Clone and install the app

git clone ""

npm install

##Install MongoDB

Download and instructions:

##Create Config files

These files are used to store your API credentials, MongoDB connection, and configs (Express options). They are not included in the GitHub repo, so please copy and paste these samples into a new file.


// config/auth.js

// expose our config directly to our application using module.exports
module.exports = {

    'facebookAuth' : {
        'clientID'        : 'xxxxxxxxxxxxx', // your App ID
        'clientSecret'    : 'yyyyyyyyyyyyyyyy', // your App Secret
        'callbackURL'     : ''

    'twitterAuth' : {
        'consumerKey'        : 'xxxxxxxxxxxxxxxxx',
        'consumerSecret'     : 'yyyyyyyyyyyyyyyyyy',
        'callbackURL'        : ''

    'linkedinAuth' : {
        'consumerKey'        : 'xxxxxxxxxxxxxxxxx',
        'consumerSecret'     : 'yyyyyyyyyyyyyyyyy',
        'callbackURL'        : ''

    'googleAuth' : {
        'clientID'         : 'xxxxxxxxxxxxxxxxxx',
        'clientSecret'     : 'yyyyyyyyyyyyyyyyyyy,
        'callbackURL'      : ''



This is where you will define the web port that the server listens on (i.e. 8181) and the SSL certificate information. You will need to create your own self-signed certificate or purchase one. This examples uses a GoDaddy SSL certificate and places the files in an SSL directory.

// Configure the app settings here such as Web port, certificates, etc.

// read from the file system (used for SSL certs)
var fs = require('fs');

module.exports = {
  port: 8181,  // WEB PORT
  key  : fs.readFileSync('./ssl/'),
  cert : fs.readFileSync('./ssl/'),
  ca: [fs.readFileSync('./ssl/gd_bundle-g2-g1.crt')]


Store the connection string to your MongoDB database here

// config/database.js
module.exports = {

    'url' : 'mongodb://localhost/excap' 


#Start the Server and Test

While in the /excap-social directory, use "node" to start the application.

node app.js

To run this app in production, I highly suggest using PM2. This will run the NodeJS application as a service, which supports logging and auto-restart.

pm2 start app.js --name "excap-social"

#Reporting You can see the session data by going to the MongoDB REST API or exploring the MongoDB manually.

*http://yourserver/ap1/v1/users *http://yourserver/ap1/v1/sessions

#Security Notes

  • You should run this using SSL.
  • Store your session and user data in a secure system behind a firewall
  • Disable the built-in MongoDB Rest interface (which is for demo only)

##Disable MongoDB REST interface

Find the following code and comment out the middleware to prevent unauthorized access to sensitive session and user data after you have examined the data and place this into production. At that point, you may want to build a separate application to utilize this data or use a third party application. The MongoDB website offers several admin and reporting UI options.

// =================================
// Admin Site mongodb API access
// =================================

// provide MongoDB REST API for JSON session data
// need to implement tokens / auth solution
  // example to pull JSON data http://yourserver:8181/api/v1/users
var expressMongoRest = require('express-mongo-rest');
//app.use('/api/v1', expressMongoRest('mongodb://localhost:27017/excap'));


This ExCap server is intended as a proof of concept and comes with no guarantee. Please feel free to use, abuse or contribute to this code. Feedback is appreciated!