Class: ContentfulBootstrap::OAuthEchoView

Inherits:
BaseTemplate
  • Object
show all
Defined in:
lib/contentful_bootstrap/server.rb

Instance Method Summary collapse

Instance Method Details

#_bodyObject



10
11
12
13
14
15
16
17
18
19
# File 'lib/contentful_bootstrap/server.rb', line 10

def _body
  script(type: "text/javascript") {
    <<-JS
      (function() {
        var access_token = window.location.hash.split('&')[0].split('=')[1];
        window.location.replace('http://localhost:5123/save_token/' + access_token);
      })();
    JS
  }
end