redirect back to base uri if there is no window opener.
This commit is contained in:
parent
25db4cc4d9
commit
57e3323663
|
@ -22,8 +22,12 @@
|
|||
<p><%=t "login.close_window" %></p>
|
||||
|
||||
<script type="text/javascript">
|
||||
window.opener.Discourse.authenticationComplete(<%=@auth_result.to_client_hash.to_json.html_safe%>);
|
||||
window.close();
|
||||
if(window.opener) {
|
||||
window.opener.Discourse.authenticationComplete(<%=@auth_result.to_client_hash.to_json.html_safe%>);
|
||||
window.close();
|
||||
} else {
|
||||
window.location = '<%= Discourse.base_uri("/") %>';
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue