use postmessage for development communication
This commit is contained in:
@@ -2,16 +2,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
if(window.parent && window.opener.App && window.opener.App.__container__){
|
||||
window.opener.App.__container__.lookup('route:application').handleAuthInfo('<%= params[:user_id] %>', '<%= params[:authentication_token] %>');
|
||||
console.log("closing window");
|
||||
window.opener.postMessage({user_id: '<%= params[:user_id] %>', authentication_token: '<%= params[:authentication_token] %>'}, "http://localhost:4200");
|
||||
window.close();
|
||||
}else{
|
||||
localStorage.setItem('auth_token', '<%= params[:authentication_token] %>');
|
||||
localStorage.setItem('user_id', '<%= params[:user_id] %>');
|
||||
window.close();
|
||||
setTimeout(function(){alert('Something went wrong. Please restart the application and warnd the Mozo crew it the proplem persists')}, 5000);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body></body>
|
||||
<body>Closing window...</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user