From 8841c0bfec195f5a1c5aefe379a34af4a59432ef 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 | 1 + 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 | 87 ++++++++++++++++++++++++++++++++++- 8 files changed, 185 insertions(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index 2d3f80527..90271a635 100644 --- a/AUTHORS +++ b/AUTHORS @@ -100,6 +100,7 @@ Peter Karman Peter McDonald Petr DlouhĂ˝ pySilver +Raphael Lullis Rodney Richardson Rustem Saiargaliev Rustem Saiargaliev diff --git a/CHANGELOG.md b/CHANGELOG.md index 32dd1734c..89268f8f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added * #1506 Support for Wildcard Origin and Redirect URIs * #1586 Turkish language support added +* #1546 Support for RP-Initiated Registration