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:
Neil Lalonde 2017-11-21 13:56:19 -05:00
parent 12beb77afa
commit 66e53f449a
2 changed files with 7 additions and 2 deletions

View File

@ -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';

View File

@ -1739,7 +1739,8 @@ en:
email_too_long: "The email you provided is too long. Mailbox names must be no more than 254 characters, and domain names must be no more than 253 characters."
reserved_username: "That username is not allowed."
missing_user_field: "You have not completed all the user fields"
close_window: "Authentication is complete. Close this window to continue."
auth_complete: "Authentication is complete."
click_to_continue: "Click here to continue."
already_logged_in: "Oops, looks like you are attempting to accept an invitation for another user. If you are not %{current_user}, please log out and try again."
user: