title: iOS Captive Network Assistant behavior on Hotspots
body: <p>We have a hotspot product using SMS authentication method. The user chooses our WiFi Hotspot network and is redirected to our login page.</p>
  
  <p>On iOS and Adroid, a Captive Portal pop-up is activated showing our login page. We ask users to fill in a form and submit their phone number. When they click "Submit" we send them an SMS with a verification code.</p>
  
  <p>The login window (hosted on our server) changes to a new page which is displaying a field to enter the verification code. So far so good... If the user sees the "notification popup" for the SMS on his screen on top of the captive window, he can see the code and enter it in the provided field and authenticate.</p>
  
  <p><em>But</em> if he doesn't have SMS notification set like this, he has to go to his SMS app and look up the code. Now, the only way to do that is to close the Captive popup but then he gets disconnected from our hotspot. If he reconnects he needs to fill in the form again and gets a new SMS but he faces the same problem.</p>
  
  <p>Now, all this time user is not authenticated, so in iOS the captive window displays "Cancel" in the top right corner. I have seen this same method on other hotspots, but from the first Captive window, the control displayed in top right corner is "Done". As far as I know, the difference there is that the "Done" control is shown when the user is authenticated and "Cancel" while he hasn't been authenticated yet.</p>
  
  <p><em>Is there a way to "fool" the CNA to "think" the user has internet access and display "Done" so when Captive window is closed, the device stays connected to our Hotspot?</em></p>
  
  <p>We are thinking either some "two-step" authentication, like temporary (to get "Done") and then the "real" one after entering verification code.</p>
  
  <p>Another way might be to use some kind of script (like "Success" trick on iOS) to fool the CNA into thinking there's internet access. But where and how to apply the "Success trick"? In some of the HTML pages in the router? Or somewhere in our login page code?</p>