This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Move the default SAML2 error HTML to a dedicated file #7067
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b8cfe79
Move the default SAML2 error HTML to a dedicated file
babolivier e55a240
Changelog
babolivier 900bca9
Update wording and config
babolivier f9e9817
Put the file in the templates directory
babolivier 0de9f94
Lint
babolivier ebfcbbf
Use innerText instead of innerHTML
babolivier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Render a configurable and comprehensible error page if something goes wrong during the SAML2 authentication process. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <title>SSO error</title> | ||
| </head> | ||
| <body> | ||
| <p>Oops! Something went wrong during authentication<span id="errormsg"></span>.</p> | ||
| <p> | ||
| If you are seeing this page after clicking a link sent to you via email, make | ||
| sure you only click the confirmation link once, and that you open the | ||
| validation link in the same client you're logging in from. | ||
| </p> | ||
| <p> | ||
| Try logging in again from your Matrix client and if the problem persists | ||
| please contact the server's administrator. | ||
| </p> | ||
|
|
||
| <script type="text/javascript"> | ||
| // Error handling to support Auth0 errors that we might get through a GET request | ||
| // to the validation endpoint. If an error is provided, it's either going to be | ||
| // located in the query string or in a query string-like URI fragment. | ||
| // We try to locate the error from any of these two locations, but if we can't | ||
| // we just don't print anything specific. | ||
| let searchStr = ""; | ||
| if (window.location.search) { | ||
| // window.location.searchParams isn't always defined when | ||
| // window.location.search is, so it's more reliable to parse the latter. | ||
| searchStr = window.location.search; | ||
| } else if (window.location.hash) { | ||
| // Replace the # with a ? so that URLSearchParams does the right thing and | ||
| // doesn't parse the first parameter incorrectly. | ||
| searchStr = window.location.hash.replace("#", "?"); | ||
| } | ||
|
|
||
| // We might end up with no error in the URL, so we need to check if we have one | ||
| // to print one. | ||
| let errorDesc = new URLSearchParams(searchStr).get("error_description") | ||
| if (errorDesc) { | ||
|
|
||
| document.getElementById("errormsg").innerText = ` ("${errorDesc}")`; | ||
| } | ||
| </script> | ||
| </body> | ||
| </html> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.