From 96616ede0ee6735ac012fadbd0d48c1e54d84554 Mon Sep 17 00:00:00 2001 From: Raphael Lullis Date: Fri, 2 May 2025 01:21:08 +0200 Subject: [PATCH] Add support for RP-Initiated Registration By adding a `prompt=create` parameter to the authorization request, the user is redirected to the OP's registration point where they can create an account, and on successful registration the user is then redirected back to the authorization view with prompt=login Closes #1546 --- AUTHORS | 1 + CHANGELOG.md | 2 +- docs/settings.rst | 19 ++++ oauth2_provider/settings.py | 2 + oauth2_provider/views/base.py | 70 ++++++++++++- oauth2_provider/views/oidc.py | 4 + tests/presets.py | 4 + tests/test_oidc_views.py | 186 +++++++++++++++++++++++++++++++++- 8 files changed, 283 insertions(+), 5 deletions(-) diff --git a/AUTHORS b/AUTHORS index 4ebe787cd..cd249c8b0 100644 --- a/AUTHORS +++ b/AUTHORS @@ -103,6 +103,7 @@ Peter McDonald Petr DlouhĂ˝ pySilver @realsuayip +Raphael Lullis Rodney Richardson Rustem Saiargaliev Rustem Saiargaliev diff --git a/CHANGELOG.md b/CHANGELOG.md index a29772c13..103d57592 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Support for Django 5.2 * Support for Python 3.14 (Django >= 5.2.8) * #1539 Add device authorization grant support - +* #1546 Support for RP-Initiated Registration