Coder Social home page Coder Social logo

wifiauth's Introduction

WiFiAuth

Because connecting to WiFI networks is still an unsolved problem

Checking if a WiFi network needs the user to login on some kind of login page is the responsibility of the operating system. However iOS is still having a hard time detecting most WiFis, resulting in apps to not work. Unless you know you have to open Safari and access a non-SSL encrypted website like http://neverssl.com, the user is confused, and doesn't know why your app is "broken".

The only app I've ever seen do this right is Facebook Messenger: They show a banner on top of the message list, letting you know the currently connected network needs some kind of user-interaction. Tapping that banner would open up an in-app browser.

This project is just a proof of concept I hacked together in less than an hour.

However I do believe it might be worth finishing that SDK and make it production ready.

Turns out, WiFi auth flows are very complicated. However from an app's perspective, sending an unencrypted GET request, and checking if there is a redirect to a login page should be enough to see if your app has access to the internet.

Update: Turns out, Ross Butler already built this with Connectivity

The current implementation uses code from Reachability, using <SystemConfiguration/SystemConfiguration.h>

SCNetworkReachabilityRef reachabilityRef = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr*)hostAddress);

if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags))
{
    return ((flags & kSCNetworkReachabilityFlagsConnectionRequired) &&
            (flags & kSCNetworkReachabilityFlagsInterventionRequired));
}

return NO;

wifiauth's People

Contributors

krausefx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wifiauth's Issues

Browser: Chrome & Safari

Browser: Chrome & Safari

Airport: Many, but I have specifically seen this at AUS, BNA, IAD, and RDU.

Approximate play time before issue: N/A

Issue Description

Aircraft will maintain the speeds assigned by the STAR while on the STAR, but once they cross the final speed restricted fix, they return to 250 kts. For example, the TAQLE1 in RDU terminates with crossing ESELL at A60|S210, then a track of 267ยฐ. The aircraft will slow down to cross ESELL at 210kt but then reaccelerate to 250kt.

Originally posted by @MichaelDMcCracken in openscope/openscope#1905

Polling is bad

This code polls once a second for the lifetime of the app. This isn't a good idea for battery life, and polling is almost never a good design. It's not necessary, since SCNetworkReachability has an observer API that lets you get callbacks when something changes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.