mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-19 10:19:27 -05:00
Feature: Allow custom redirect_uri for OIDC
This commit is contained in:
parent
79956d6a7b
commit
1437b10252
@ -581,6 +581,12 @@ system. See the corresponding
|
|||||||
|
|
||||||
Defaults to 'https'
|
Defaults to 'https'
|
||||||
|
|
||||||
|
#### [`PAPERLESS_OIDC_REDIRECT_URI=<string>`](#PAPERLESS_OIDC_REDIRECT_URI) {#PAPERLESS_OIDC_REDIRECT_URI}
|
||||||
|
|
||||||
|
: The redirect URI which will be passed to the OAuth callback.
|
||||||
|
|
||||||
|
: Defaults to ''.
|
||||||
|
|
||||||
#### [`PAPERLESS_ACCOUNT_EMAIL_VERIFICATION=<string>`](#PAPERLESS_ACCOUNT_EMAIL_VERIFICATION) {#PAPERLESS_ACCOUNT_EMAIL_VERIFICATION}
|
#### [`PAPERLESS_ACCOUNT_EMAIL_VERIFICATION=<string>`](#PAPERLESS_ACCOUNT_EMAIL_VERIFICATION) {#PAPERLESS_ACCOUNT_EMAIL_VERIFICATION}
|
||||||
|
|
||||||
: Determines whether email addresses are verified during signup (as performed by Django allauth). See the relevant
|
: Determines whether email addresses are verified during signup (as performed by Django allauth). See the relevant
|
||||||
|
@ -77,8 +77,7 @@ class CustomSocialAccountAdapter(DefaultSocialAccountAdapter):
|
|||||||
Returns the default URL to redirect to after successfully
|
Returns the default URL to redirect to after successfully
|
||||||
connecting a social account.
|
connecting a social account.
|
||||||
"""
|
"""
|
||||||
url = reverse("base")
|
return getattr(settings, 'OIDC_REDIRECT_URI', '') or reverse("base")
|
||||||
return url
|
|
||||||
|
|
||||||
def populate_user(self, request, sociallogin, data):
|
def populate_user(self, request, sociallogin, data):
|
||||||
"""
|
"""
|
||||||
|
@ -457,6 +457,8 @@ ACCOUNT_DEFAULT_HTTP_PROTOCOL = os.getenv(
|
|||||||
"https",
|
"https",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
OIDC_REDIRECT_URI: Final[str] = os.getenv("PAPERLESS_OIDC_REDIRECT_URI", "")
|
||||||
|
|
||||||
ACCOUNT_ADAPTER = "paperless.adapter.CustomAccountAdapter"
|
ACCOUNT_ADAPTER = "paperless.adapter.CustomAccountAdapter"
|
||||||
ACCOUNT_ALLOW_SIGNUPS = __get_boolean("PAPERLESS_ACCOUNT_ALLOW_SIGNUPS")
|
ACCOUNT_ALLOW_SIGNUPS = __get_boolean("PAPERLESS_ACCOUNT_ALLOW_SIGNUPS")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user