Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Newbie
    Join Date
    Jul 2016
    Posts
    12

    Default Facebook Login For Captive Portal

    Hi

    I posted to Git Hub Link where you can download example FB Login in Untangle Captive Portal

    https://github.com/yuanyudistira/Unt...Facebook-Login

    Still very basic. And also it has work around in order for user to use facebook to authenticate.
    We need to add Facebook IP to Passed Listed Server Address.

  2. #2
    Untangle Ninja jcoehoorn's Avatar
    Join Date
    Mar 2010
    Location
    York, NE
    Posts
    1,893

    Default

    Facebook has MANY IPs, some of which change depending on which cloud server you're hitting that day.
    Five time Microsoft ASP.Net MVP managing a Lenovo RD330 / E5-2420 / 16GB with Untangle 16.4.1 to protect 500Mbits for ~450 residential college students and associated staff and faculty

  3. #3
    Untangle Junkie dmorris's Avatar
    Join Date
    Nov 2006
    Location
    San Carlos, CA
    Posts
    17,747

    Default

    Very cool!

    You can add a pass rule for "HTTP: Hostname" for whatever hostname is needed. (login.facebook.com?)
    I think this would be far easier and more likely to work around the world.

    Alternatively, 12.1 has an experimental facebook integration functionality in directory connector so you can just use the standard login page authenticated against facebook. I think your approach is better as the user is authenticating directly with facebook first and then presumably you verify the oauth token later?
    This is better, but obviously you need to allow access to facebook in order to do so.
    Attention: Support and help on the Untangle Forums is provided by volunteers and community members like yourself.
    If you need Untangle support please call or email support@untangle.com

  4. #4

  5. #5
    Newbie
    Join Date
    Jul 2016
    Posts
    12

    Default

    Quote Originally Posted by dmorris View Post
    Very cool!

    You can add a pass rule for "HTTP: Hostname" for whatever hostname is needed. (login.facebook.com?)
    I think this would be far easier and more likely to work around the world.

    Alternatively, 12.1 has an experimental facebook integration functionality in directory connector so you can just use the standard login page authenticated against facebook. I think your approach is better as the user is authenticating directly with facebook first and then presumably you verify the oauth token later?
    This is better, but obviously you need to allow access to facebook in order to do so.
    I hope this can be added to the Captive Page Pass Rule...not to By Pass Rule,
    as I might add it only to specific rack, not all rack

  6. #6
    Untangle Junkie dmorris's Avatar
    Join Date
    Nov 2006
    Location
    San Carlos, CA
    Posts
    17,747

    Default

    Indeed captive portal rules.

    Bypass rules don't know the http hostname

    Sent from my Nexus 6P using Tapatalk
    Attention: Support and help on the Untangle Forums is provided by volunteers and community members like yourself.
    If you need Untangle support please call or email support@untangle.com

  7. #7
    Newbie
    Join Date
    Jul 2016
    Posts
    12

    Default

    Quote Originally Posted by dmorris View Post
    Indeed captive portal rules.

    Bypass rules don't know the http hostname

    Sent from my Nexus 6P using Tapatalk
    I miss this one,...So the rule must be above the rule that capture all traffic?

    and now I can see we can also by pass based on HTTP: Referer,
    so if user access to facebook directly, it will be capture, but if its referer is the UTM hostname it will pass.

  8. #8
    Newbie
    Join Date
    Jul 2016
    Posts
    12

    Default

    After doing some testing,
    I believe its more convenient to create Captive Pass Rule just using HTTP:referer.

    I tried to access directly by type-ing facebook.com into browser, it get captured.
    But when I click button on the captive, the authentication process working very fine.

    I think the method can be used to authenticate using other services google, twitter etc.

  9. #9
    Newbie
    Join Date
    Jul 2016
    Posts
    12

    Default

    I wonder if anyone can help, as I want to pass FB Name and Email into the User Name of Untangle Field,

    I am trying to use Untangle Captive Default FORM and trying to populate Form Hidden Field: Username with user facebook name,
    But still I got Anonymous please see this picture:

    anonymous.jpg

    Here is the FORM Code I am using:

    <form style="text-align:center" id="guestForm" method="post" action="/capture/handler.py/infopost">
    <fieldset class="bacgroundwhite">

    <legend class="legendFiledset">Internet Policy</legend>

    <textarea rows="10" cols="50" readonly="true" wrap class="styled">
    For security reason, every traffic going out to the world wide web is logged. Do not use the internet access to violate the law.
    Please authenticate using facebook, to continue...</textarea>


    <hr />
    <input id="agreechecked" type="hidden" name="agree" type="checkbox" value="agree" id="agree" class="" checked />

    <div class="submit">
    <input class="button" name="submit" id="submit" type="button" value="Step 1, Continue to FB Login" onclick="checkFacebookLogin();" />

    <input name="submit2" id="submit2" type="submit" onclick="myFunction()" value="Step 2, Continue" style="display:none;" />
    </div>
    <h2 style="color:red;display:none;">$.ProblemText.$</h2>
    </fieldset>
    <input name="method" id="method" type="hidden" value="$.method.$"></input>
    <input name="nonce" id="nonce" type="hidden" value="$.nonce.$"></input>
    <input name="appid" id="appid" type="hidden" value="$.appid.$"></input>
    <input name="host" id="host" type="hidden" value="$.host.$"></input>
    <input name="username" id="username" type="hidden" value="fb\username">
    <input name="Username" id="Username" type="hidden" value="fb\username">

    <input name="uri" id="uri" type="hidden" value="$.uri.$"></input>


    </form>

  10. #10
    Untangle Junkie dmorris's Avatar
    Join Date
    Nov 2006
    Location
    San Carlos, CA
    Posts
    17,747

    Default

    You need to get the appropriate entry from the host table and set the username attribute on the host table entry to whatever you want it set to.
    Attention: Support and help on the Untangle Forums is provided by volunteers and community members like yourself.
    If you need Untangle support please call or email support@untangle.com

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO 3.6.0 PL2