mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Auth complete page/modal has a link to continue to the site to accomodate auth methods that can't automatically redirect to Discourse
This commit is contained in:
@@ -19,13 +19,17 @@
|
||||
|
||||
<body>
|
||||
<div class="dialog">
|
||||
<p><%=t "login.close_window" %></p>
|
||||
<p>
|
||||
<%=t "login.auth_complete" %>
|
||||
<a href="<%= Discourse.base_url.html_safe %>?authComplete=true"><%= t("login.click_to_continue") %></a>
|
||||
</p>
|
||||
|
||||
<script type="text/javascript">
|
||||
var authResult = <%=@auth_result.to_client_hash.to_json.html_safe%>;
|
||||
|
||||
// On facebook browser, just redirect and don't close
|
||||
var ua = navigator.userAgent || navigator.vendor || window.opera;
|
||||
|
||||
if (!window.opener) {
|
||||
localStorage.setItem('lastAuthResult', JSON.stringify(authResult));
|
||||
window.location.href = '<%= Discourse.base_url.html_safe %>?authComplete=true';
|
||||
|
||||
Reference in New Issue
Block a user