mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-09 00:05:21 +01:00
Fix: use state param with oauth (#8636)
This commit is contained in:
parent
0ab21b6fc5
commit
a899ff16e3
4 changed files with 65 additions and 6 deletions
|
|
@ -1717,10 +1717,12 @@ class UiSettingsView(GenericAPIView):
|
|||
manager = PaperlessMailOAuth2Manager()
|
||||
if settings.GMAIL_OAUTH_ENABLED:
|
||||
ui_settings["gmail_oauth_url"] = manager.get_gmail_authorization_url()
|
||||
request.session["oauth_state"] = manager.state
|
||||
if settings.OUTLOOK_OAUTH_ENABLED:
|
||||
ui_settings["outlook_oauth_url"] = (
|
||||
manager.get_outlook_authorization_url()
|
||||
)
|
||||
request.session["oauth_state"] = manager.state
|
||||
|
||||
ui_settings["email_enabled"] = settings.EMAIL_ENABLED
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue