mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-03-25 14:19:56 -04: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>
|
<p><%=t "login.close_window" %></p>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
window.opener.Discourse.authenticationComplete(<%=@auth_result.to_client_hash.to_json.html_safe%>);
|
if(window.opener) {
|
||||||
window.close();
|
window.opener.Discourse.authenticationComplete(<%=@auth_result.to_client_hash.to_json.html_safe%>);
|
||||||
|
window.close();
|
||||||
|
} else {
|
||||||
|
window.location = '<%= Discourse.base_uri("/") %>';
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Add table
Reference in a new issue