use postmessage for development communication
This commit is contained in:
@@ -1,17 +1,11 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<script>
|
<script>
|
||||||
if(window.parent && window.opener.App && window.opener.App.__container__){
|
console.log("closing window");
|
||||||
window.opener.App.__container__.lookup('route:application').handleAuthInfo('<%= params[:user_id] %>', '<%= params[:authentication_token] %>');
|
window.opener.postMessage({user_id: '<%= params[:user_id] %>', authentication_token: '<%= params[:authentication_token] %>'}, "http://localhost:4200");
|
||||||
window.close();
|
window.close();
|
||||||
}else{
|
</script>
|
||||||
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>
|
</head>
|
||||||
<body></body>
|
<body>Closing window...</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user