FIX: on completion of external auth, window.close may fail because of iOS Safari bug. Prompt user to manually close the window.

This commit is contained in:
Neil Lalonde 2014-10-15 11:00:34 -04:00
parent a34ed4d3e5
commit 4762b4ac24
2 changed files with 25 additions and 3 deletions

View File

@ -1,9 +1,30 @@
<!DOCTYPE html>
<html>
<head></head>
<body>
<head>
<title><%= SiteSetting.title %></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<style type="text/css">
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
div.dialog {
width: 90%;
padding: 0 1em;
margin: 2em auto 0 auto;
border: 1px solid #ccc;
border-right-color: #999;
border-bottom-color: #999;
}
</style>
</head>
<body>
<div class="dialog">
<p><%=t "login.close_window" %></p>
<script type="text/javascript">
window.opener.Discourse.authenticationComplete(<%=@data.to_client_hash.to_json.html_safe%>);
window.close();
</script>
</body>
</div>
</body>
</html>

View File

@ -1107,6 +1107,7 @@ en:
new_registrations_disabled: "New account registrations are not allowed at this time."
password_too_long: "Passwords are limited to 200 characters."
missing_user_field: "You have not completed all the user fields"
close_window: "Authentication is complete. Close this window to continue."
user:
no_accounts_associated: "No accounts associated"