Sha256: bc3522d5ed91d76e3fafad76008e471ecbd59e82fe8a7d26b7079b3be6841bd4

Contents?: true

Size: 1.09 KB

Versions: 8

Compression:

Stored size: 1.09 KB

Contents

<!DOCTYPE html>
<html>
  <head>
    <script>
      /*
        The data is accessible in two ways:

        1. Using the postMessage api, this window will respond to a
            'message' event with a post of all the data. (This can
            be used by browsers other than IE if this window was
            opened with window.open())
        2. This window has a function called requestCredentials which,
            when called, will return the data. (This can be
            used if this window was opened in an inAppBrowser using
            Cordova / PhoneGap)
      */

      var data = <%= @data.to_json.html_safe %>;

      window.addEventListener("message", function(ev) {
        if (ev.data === "requestCredentials") {
          ev.source.postMessage(data, '*');
          window.close();
        }
      });
      function requestCredentials() {
        return data;
      }
      setTimeout(function() {
        document.getElementById('text').innerHTML = (data && data.error) || 'Redirecting...';
      }, 1000);
    </script>
  </head>
  <body>
    <pre id="text">
    </pre>
  </body>
</html>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
devise_token_auth-0.1.42 app/views/devise_token_auth/omniauth_external_window.html.erb
devise_token_auth-0.1.41 app/views/devise_token_auth/omniauth_external_window.html.erb
devise_token_auth-0.1.40 app/views/devise_token_auth/omniauth_external_window.html.erb
devise_token_auth-0.1.39 app/views/devise_token_auth/omniauth_external_window.html.erb
devise_token_auth-0.1.38 app/views/devise_token_auth/omniauth_external_window.html.erb
devise_token_auth-0.1.37 app/views/devise_token_auth/omniauth_external_window.html.erb
devise_token_auth-0.1.37.beta4 app/views/devise_token_auth/omniauth_external_window.html.erb
devise_token_auth-0.1.37.beta3 app/views/devise_token_auth/omniauth_external_window.html.erb