From 615bc0033ee1d7bf16d5e32e6b72b56d8a9399a1 Mon Sep 17 00:00:00 2001 From: Herculino Trotta Date: Sun, 15 Nov 2026 16:54:14 -0300 Subject: [PATCH] feat(oauth): match the consent screen to the app Override django-oauth-toolkit's unstyled authorize template with the login page's layout. It says who's signed in, what the app will be able to do, and where the answer is sent, so a look-alike app with someone else's redirect is easier to spot. --- app/templates/oauth2_provider/authorize.html | 51 ++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 app/templates/oauth2_provider/authorize.html diff --git a/app/templates/oauth2_provider/authorize.html b/app/templates/oauth2_provider/authorize.html new file mode 100644 index 00000000..dc77005f --- /dev/null +++ b/app/templates/oauth2_provider/authorize.html @@ -0,0 +1,51 @@ +{% extends "layouts/base_auth.html" %} +{% load i18n %} + +{% block title %}{% translate "Authorize" %}{% endblock %} + +{% block content %} +
+
+
+
+ {% if not error %} +
+ {% csrf_token %} + {% for field in form %} + {% if field.is_hidden %}{{ field }}{% endif %} + {% endfor %} + +

+ {% blocktranslate with name=application.name %}Allow {{ name }} to use your WYGIWYH?{% endblocktranslate %} +

+

+ {% blocktranslate with email=request.user.email %}Signed in as {{ email }}{% endblocktranslate %} +

+ +

+ {% translate "It will be able to see and change everything you can: accounts, transactions, categories and the rest." %} +

+

+ {% translate "Your answer is sent to" %} + {{ form.redirect_uri.value }} +

+ + {% if form.non_field_errors %} + + {% endif %} + +
+ + +
+
+ {% else %} +

{% translate "This app can't be authorized" %}

+

{{ error.description }}

+

{{ error.error }}

+ {% endif %} +
+
+
+
+{% endblock %}