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:
parent
a34ed4d3e5
commit
4762b4ac24
2 changed files with 25 additions and 3 deletions
|
@ -1,9 +1,30 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head></head>
|
<head>
|
||||||
<body>
|
<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">
|
<script type="text/javascript">
|
||||||
window.opener.Discourse.authenticationComplete(<%=@data.to_client_hash.to_json.html_safe%>);
|
window.opener.Discourse.authenticationComplete(<%=@data.to_client_hash.to_json.html_safe%>);
|
||||||
window.close();
|
window.close();
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</div>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1107,6 +1107,7 @@ en:
|
||||||
new_registrations_disabled: "New account registrations are not allowed at this time."
|
new_registrations_disabled: "New account registrations are not allowed at this time."
|
||||||
password_too_long: "Passwords are limited to 200 characters."
|
password_too_long: "Passwords are limited to 200 characters."
|
||||||
missing_user_field: "You have not completed all the user fields"
|
missing_user_field: "You have not completed all the user fields"
|
||||||
|
close_window: "Authentication is complete. Close this window to continue."
|
||||||
|
|
||||||
user:
|
user:
|
||||||
no_accounts_associated: "No accounts associated"
|
no_accounts_associated: "No accounts associated"
|
||||||
|
|
Reference in a new issue