From b8c3264cfaa07264be753a599659f5742e991053 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 e5357ae7c..fc4d669cf 100644 --- a/AUTHORS +++ b/AUTHORS @@ -99,6 +99,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 8c4770459..ff21c2a65 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] ### Added * #1506 Support for Wildcard Origin and Redirect URIs +* #1546 Support for RP-Initiated Registration