Commit Graph

58 Commits

Author SHA1 Message Date
Jeyachandran Rathnam
e512b25cd1
Fix : Remove dependency on jquery on reCAPTCHA page () 2022-12-14 12:02:28 +00:00
Ashish Kumar
a58b550eac
Fix html templates to load images only on HTTPS ()
This PR changes http-based image URLs to be https in html templates.
This impacts the Synapse SSO error page, where browsers report mixed
media content warnings.

Also, https://matrix.org/img/vector-logo-email.png is currently broken
but the URL has been updated to be https anyway.

Signed-off-by: Ashish Kumar <ashfame@users.noreply.github.com>
2022-12-08 17:28:02 +00:00
Erik Johnston
5cb6ad3b87
Fix HTML templates missing correct HTML tags () 2022-11-16 11:14:38 +00:00
Germain
1d45ad8b2a
Improve aesthetics and reusability of HTML templates. ()
Use a base template to create a cohesive feel across the HTML
templates provided by Synapse.

Adds basic styling to the base template for a more user-friendly
look and feel.
2022-10-21 17:44:00 +00:00
Germain
4390121684
Add viewport directive to HTML templates to optimise for mobile () 2022-08-11 14:04:20 +01:00
Doug
549c55606a
Disable autocorrect and autocaptialisation when entering username for SSO registration. ()
When registering a new account via SSO on iOS, the text field becomes pretty annoying as it autocapitalises and autocorrects your input. This PR fixes that (although I have only tested the raw HTML file on the simulator, I'm not sure how to get the complete setup available for testing in the flow).
2022-07-26 08:08:20 +00:00
Patrick Cloke
103f51d867
Fix Jinja templating error when generating thumbnail URLs. ()
scale is meant to be a constant string, not refer to a variable.
2022-04-20 12:03:03 -04:00
Michael Telatynski
01211e0c16
Tweak copy for sso account details template ()
* Tweak copy for sso account details template
* Update sso footer copyright year
* Add newsfragment

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2022-03-22 10:22:25 +00:00
reivilibre
6134b3079e
Reword 'Choose your user name' as 'Choose your account name' in the SSO registration template, in order to comply with SIWA guidelines. ()
* Reword as 'Choose your account name'

* Newsfile

Signed-off-by: Olivier Wilkinson (reivilibre) <oliverw@matrix.org>
2022-03-21 12:16:46 +00:00
Brendan Abolivier
003cc6910a
Update the SSO username picker template to comply with SIWA guidelines ()
Fixes https://github.com/matrix-org/synapse/issues/12205
2022-03-11 13:20:00 +00:00
Callum Brown
947dbbdfd1
Implement MSC3231: Token authenticated registration ()
Signed-off-by: Callum Brown <callum@calcuode.com>

This is part of my GSoC project implementing [MSC3231](https://github.com/matrix-org/matrix-doc/pull/3231).
2021-08-21 22:14:43 +01:00
Callum Brown
6e613a10d0
Display an error page during failure of fallback UIA. () 2021-08-18 08:13:35 -04:00
Andrew Morgan
71f0623de9
Port "Allow users to click account renewal links multiple times without hitting an 'Invalid Token' page " from synapse-dinsic ()
This attempts to be a direct port of https://github.com/matrix-org/synapse-dinsic/pull/74 to mainline. There was some fiddling required to deal with the changes that have been made to mainline since (mainly dealing with the split of `RegistrationWorkerStore` from `RegistrationStore`, and the changes made to `self.make_request` in test code).
2021-04-19 19:16:34 +01:00
Patrick Cloke
b114a45f5f
Support not providing an IdP icon when choosing a username. () 2021-02-19 07:48:46 -05:00
Richard van der Hoff
17f2a512f3 Merge remote-tracking branch 'origin/release-v1.27.0' into social_login_hotfixes 2021-02-03 20:33:32 +00:00
Richard van der Hoff
e288499c60
Social login UI polish () 2021-02-03 20:31:23 +00:00
Richard van der Hoff
7a0dcea3e5
social login Fix username validation javascript ()
* fix validation and don't use built-in validation UI

Co-authored-by: Bruno Windels <brunow@element.io>
2021-02-03 17:52:55 +00:00
Richard van der Hoff
96e460df2e
social login: add noopener to terms link () 2021-02-02 18:35:28 +00:00
Richard van der Hoff
8fee6a3ab2 Merge branch 'social_login' into develop 2021-02-01 18:48:11 +00:00
Richard van der Hoff
351845452c fix broken HTML tag 2021-02-01 18:47:01 +00:00
Richard van der Hoff
5963426b95 Merge branch 'social_login' into develop 2021-02-01 18:46:12 +00:00
Bruno Windels
f30c3a99be make primary button not wider than viewport 2021-02-01 18:39:17 +00:00
Richard van der Hoff
c543bf87ec
Collect terms consent from the user during SSO registration () 2021-02-01 18:37:41 +00:00
Richard van der Hoff
e5d70c8a82
Improve styling and wording of SSO UIA templates ()
fixes 
2021-02-01 18:36:04 +00:00
Richard van der Hoff
419313b06a
Improve styling and wording of SSO error templates () 2021-02-01 18:01:15 +00:00
Richard van der Hoff
85c56b5a67
Make importing display name and email optional () 2021-02-01 17:30:42 +00:00
Richard van der Hoff
18ab35284a Merge branch 'social_login' into develop 2021-02-01 17:28:37 +00:00
Richard van der Hoff
4167494c90
Replace username picker with a template ()
There's some prelimiary work here to pull out the construction of a jinja environment to a separate function.

I wanted to load the template at display time rather than load time, so that it's easy to update on the fly. Honestly, I think we should do this with all our templates: the risk of ending up with malformed templates is far outweighed by the improved turnaround time for an admin trying to update them.
2021-02-01 15:52:50 +00:00
Richard van der Hoff
8aed29dc61
Improve styling and wording of SSO redirect confirm template () 2021-02-01 15:50:56 +00:00
Patrick Cloke
e54746bdf7
Clean-up the template loading code. ()
* Enables autoescape by default for HTML files.
* Adds a new read_template method for reading a single template.
* Some logic clean-up.
2021-01-27 10:59:50 -05:00
Richard van der Hoff
0cd2938bc8
Support icons for Identity Providers () 2021-01-20 08:15:14 -05:00
Richard van der Hoff
5310808d3b Give the user a better error when they present bad SSO creds
If a user tries to do UI Auth via SSO, but uses the wrong account on the SSO
IdP, try to give them a better error.

Previously, the UIA would claim to be successful, but then the operation in
question would simply fail with "auth fail". Instead, serve up an error page
which explains the failure.
2021-01-13 20:22:41 +00:00
Richard van der Hoff
111b673fc1
Add initial support for a "pick your IdP" page ()
During login, if there are multiple IdPs enabled, offer the user a choice of
IdPs.
2021-01-05 11:25:28 +00:00
Patrick Cloke
4136255d3c
Ensure that a URL exists in the content during push. ()
This fixes an KeyError exception, after this PR the content
is just considered unknown.
2020-12-18 07:26:15 -05:00
Patrick Cloke
c356b4bf42
Include a simple message in email notifications that include encrypted content () 2020-10-19 09:12:39 -04:00
Patrick Cloke
34ff8da83b
Convert additional templates to Jinja ()
This converts a few more of our inline HTML templates to Jinja. This is somewhat part of  and should make it a bit easier to customize these in the future.
2020-10-02 11:15:53 +01:00
Patrick Cloke
31acc5c309
Escape the error description on the sso_error template. () 2020-09-25 11:05:54 -04:00
Patrick Cloke
6605470bfb
Improve SAML error messages () 2020-09-14 09:05:36 -04:00
Andrew Morgan
a3a90ee031
Show a confirmation page during user password reset ()
This PR adds a confirmation step to resetting your user password between clicking the link in your email and your password actually being reset.

This is to better align our password reset flow with the industry standard of requiring a confirmation from the user after email validation.
2020-09-10 11:45:12 +01:00
Richard van der Hoff
0cb169900e
Implement login blocking based on SAML attributes ()
Hopefully this mostly speaks for itself. I also did a bit of cleaning up of the
error handling.

Fixes 
2020-08-11 16:08:10 +01:00
Jason Robinson
759481af6d
Element CSS and logo in email templates ()
Use Element CSS and logo in notification emails when app name is Element.

Signed-off-by: Jason Robinson <jasonr@matrix.org>
2020-07-21 11:58:01 +01:00
Quentin Gliech
616af44137
Implement OpenID Connect-based login () 2020-05-08 08:30:40 -04:00
Patrick Cloke
9e0384dd3f
Fixes typo (bellow -> below) () 2020-05-07 09:31:06 -04:00
Patrick Cloke
054c231e58
Use a template for the SSO success page to allow for customization. () 2020-04-17 13:34:55 -04:00
Patrick Cloke
b85d7652ff
Do not allow a deactivated user to login via SSO. () 2020-04-09 13:28:13 -04:00
Patrick Cloke
b9930d24a0
Support SAML in the user interactive authentication workflow. () 2020-04-01 08:48:00 -04:00
Brendan Abolivier
ebfcbbff9c
Use innerText instead of innerHTML 2020-03-13 19:09:22 +00:00
Brendan Abolivier
900bca9707
Update wording and config 2020-03-11 19:40:30 +00:00
Brendan Abolivier
b8cfe79ffc
Move the default SAML2 error HTML to a dedicated file
Also add some JS to it to process any error we might have in the URI
(see ).
2020-03-11 19:33:16 +00:00
Brendan Abolivier
b2bd54a2e3 Add a confirmation step to the SSO login flow 2020-03-02 16:36:32 +00:00