diff --git a/src/pretix/presale/templates/pretixpresale/organizers/customer_login_interrupted_message.html b/src/pretix/presale/templates/pretixpresale/organizers/customer_login_interrupted_message.html new file mode 100644 index 000000000..faf44a566 --- /dev/null +++ b/src/pretix/presale/templates/pretixpresale/organizers/customer_login_interrupted_message.html @@ -0,0 +1,64 @@ +{% load i18n %} + +
+ {% blocktrans %} + We couldn't complete your login because something interrupted the process. + {% endblocktrans %} +
+ ++ {% blocktrans trimmed %} + If the problem continues, closing all browser windows and clearing cookies + before retrying can help. As a last step, try using a different browser or + another device (for example, a desktop or laptop computer). + {% endblocktrans %} +
diff --git a/src/pretix/presale/views/customer.py b/src/pretix/presale/views/customer.py index 5e15cfe44..9cafb72b5 100644 --- a/src/pretix/presale/views/customer.py +++ b/src/pretix/presale/views/customer.py @@ -36,10 +36,12 @@ from django.db.models import ( ) from django.http import Http404, HttpResponseRedirect from django.shortcuts import get_object_or_404, render +from django.template.loader import render_to_string from django.utils.crypto import get_random_string from django.utils.decorators import method_decorator from django.utils.functional import cached_property from django.utils.http import url_has_allowed_host_and_scheme +from django.utils.safestring import mark_safe from django.utils.translation import gettext_lazy as _ from django.views.decorators.cache import never_cache from django.views.decorators.csrf import csrf_protect @@ -774,9 +776,7 @@ class SSOLoginReturnView(RedirectBackMixin, View): if nonce != request.session.get(f'pretix_customerauth_{self.provider.pk}_nonce'): return self._fail( - _('Login was not successful. Error message: "{error}".').format( - error='invalid one-time token', - ), + mark_safe(render_to_string("pretixpresale/organizers/customer_login_interrupted_message.html")), popup_origin, ) redirect_uri = eventreverse_absolute(