Configure Social Login

From WiDirect
Jump to: navigation, search

Currently the WiDirect supports social media login using Facebook. Several things must be done to allow these accounts to be authenticated on the WiDirect. A domain must be configured on the WiDirect for users to access the login page. The Facebook app must be created on the Facebook Developer site. Additionally details about the Facebook app must be entered on the WiDirect.

Configure DNS

Configuring Facebook login on the WiDirect requires a domain be assigned to the WiDirect. The easiest method is to create a public domain with the A record pointing to the WiDirect. An alternative solution is to create a fictitious domain and have the WiDirect DNS server return the eth1 IP when resolving that domain.

To create a new domain from the WiDirect add a line to the DNS configuration file like below:

address=/widirect-local.allcitywireless.com/10.4.1.1

From the command line modify the /etc/hosts file to add a line like this:

10.4.1.1 widirect-local.allcitywireless.com

The domain must also be set in the firewall configuration. The AuthServer line, which defaults to eth1, should be updated to the domain being used.

Create Facebook Application

The next step is to create the Facebook application. Open the Facebook Developer site, https://developers.facebook.com, and follow the steps below:

  • Select "Create a New App"
  • Enter the name for your app. In this case we are using "Public WiFi Login" as our app name
  • Select any category
  • Select continue and enter the security code
  • Click Settings, then click Add Platform and choose Website. Enter the Site URL with the domain created for the WiDirect.
  • Under app domain, enter the app domain we created before. In this example, it's "widirect-local.allcitywireless.com". Also enter an email address in the Contact Email field.
  • On the Status & Review tab turn on the option to make the app available to the general public,
  • Record the AppId and the AppSecret values

The Facebook application is now created. All that's left is to enable Facebook logins on the WiDirect


Enable Facebook Login on WiDirect

Also on the Firewall page be sure "facebook-disabled" is set to 0 and "facebook-permit-time" is set to 90. If those lines does not exist they can be added.