mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
redirect back to base uri if there is no window opener.
This commit is contained in:
parent
25db4cc4d9
commit
57e3323663
1 changed files with 6 additions and 2 deletions
|
@ -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 a new issue