|
1 | 1 | <!DOCTYPE html>
|
2 | 2 | <html lang="en">
|
3 |
| -<head> |
4 |
| - <meta charset="UTF-8"> |
5 |
| - <title>SSO error</title> |
6 |
| -</head> |
7 |
| -<body> |
| 3 | + <head> |
| 4 | + <meta charset="UTF-8"> |
| 5 | + <title>Authentication failed</title> |
| 6 | + <meta name="viewport" content="width=device-width, user-scalable=no"> |
| 7 | + <style type="text/css"> |
| 8 | + {% include "sso.css" without context %} |
| 9 | + |
| 10 | + #error_code { |
| 11 | + margin-top: 56px; |
| 12 | + } |
| 13 | + </style> |
| 14 | + </head> |
| 15 | + <body class="error_page"> |
8 | 16 | {# If an error of unauthorised is returned it means we have actively rejected their login #}
|
9 | 17 | {% if error == "unauthorised" %}
|
10 |
| - <p>You are not allowed to log in here.</p> |
| 18 | + <header> |
| 19 | + <p>You are not allowed to log in here.</p> |
| 20 | + </header> |
11 | 21 | {% else %}
|
12 |
| - <p> |
13 |
| - There was an error during authentication: |
14 |
| - </p> |
15 |
| - <div id="errormsg" style="margin:20px 80px">{{ error_description | e }}</div> |
16 |
| - <p> |
17 |
| - If you are seeing this page after clicking a link sent to you via email, make |
18 |
| - sure you only click the confirmation link once, and that you open the |
19 |
| - validation link in the same client you're logging in from. |
20 |
| - </p> |
21 |
| - <p> |
22 |
| - Try logging in again from your Matrix client and if the problem persists |
23 |
| - please contact the server's administrator. |
24 |
| - </p> |
25 |
| - <p>Error: <code>{{ error }}</code></p> |
| 22 | + <header> |
| 23 | + <h1>There was an error</h1> |
| 24 | + <p> |
| 25 | + <strong id="errormsg">{{ error_description | e }}</strong> |
| 26 | + </p> |
| 27 | + <p> |
| 28 | + If you are seeing this page after clicking a link sent to you via email, |
| 29 | + make sure you only click the confirmation link once, and that you open |
| 30 | + the validation link in the same client you're logging in from. |
| 31 | + </p> |
| 32 | + <p> |
| 33 | + Try logging in again from your Matrix client and if the problem persists |
| 34 | + please contact the server's administrator. |
| 35 | + </p> |
| 36 | + <div id="error_code"> |
| 37 | + <p><strong>Error code</strong></p> |
| 38 | + <p>{{ error | e }}</p> |
| 39 | + </div> |
| 40 | + </header> |
26 | 41 |
|
27 |
| - <script type="text/javascript"> |
28 |
| - // Error handling to support Auth0 errors that we might get through a GET request |
29 |
| - // to the validation endpoint. If an error is provided, it's either going to be |
30 |
| - // located in the query string or in a query string-like URI fragment. |
31 |
| - // We try to locate the error from any of these two locations, but if we can't |
32 |
| - // we just don't print anything specific. |
33 |
| - let searchStr = ""; |
34 |
| - if (window.location.search) { |
35 |
| - // window.location.searchParams isn't always defined when |
36 |
| - // window.location.search is, so it's more reliable to parse the latter. |
37 |
| - searchStr = window.location.search; |
38 |
| - } else if (window.location.hash) { |
39 |
| - // Replace the # with a ? so that URLSearchParams does the right thing and |
40 |
| - // doesn't parse the first parameter incorrectly. |
41 |
| - searchStr = window.location.hash.replace("#", "?"); |
42 |
| - } |
| 42 | + <script type="text/javascript"> |
| 43 | + // Error handling to support Auth0 errors that we might get through a GET request |
| 44 | + // to the validation endpoint. If an error is provided, it's either going to be |
| 45 | + // located in the query string or in a query string-like URI fragment. |
| 46 | + // We try to locate the error from any of these two locations, but if we can't |
| 47 | + // we just don't print anything specific. |
| 48 | + let searchStr = ""; |
| 49 | + if (window.location.search) { |
| 50 | + // window.location.searchParams isn't always defined when |
| 51 | + // window.location.search is, so it's more reliable to parse the latter. |
| 52 | + searchStr = window.location.search; |
| 53 | + } else if (window.location.hash) { |
| 54 | + // Replace the # with a ? so that URLSearchParams does the right thing and |
| 55 | + // doesn't parse the first parameter incorrectly. |
| 56 | + searchStr = window.location.hash.replace("#", "?"); |
| 57 | + } |
43 | 58 |
|
44 |
| - // We might end up with no error in the URL, so we need to check if we have one |
45 |
| - // to print one. |
46 |
| - let errorDesc = new URLSearchParams(searchStr).get("error_description") |
47 |
| - if (errorDesc) { |
48 |
| - document.getElementById("errormsg").innerText = errorDesc; |
49 |
| - } |
50 |
| - </script> |
| 59 | + // We might end up with no error in the URL, so we need to check if we have one |
| 60 | + // to print one. |
| 61 | + let errorDesc = new URLSearchParams(searchStr).get("error_description") |
| 62 | + if (errorDesc) { |
| 63 | + document.getElementById("errormsg").innerText = errorDesc; |
| 64 | + } |
| 65 | + </script> |
51 | 66 | {% endif %}
|
52 | 67 | </body>
|
53 | 68 | </html>
|
0 commit comments