Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion flower/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,15 @@ def extract_settings():
settings[name] = prepend_url(settings[name], options.url_prefix)

if options.auth:
oauth2_secret_file = os.environ.get("FLOWER_OAUTH2_SECRET_FILE", "")
oauth2_secret = (
options.oauth2_secret or os.environ.get("FLOWER_OAUTH2_SECRET")
if not oauth2_secret_file
else open(oauth2_secret_file, "r").readline()
)
settings['oauth'] = {
'key': options.oauth2_key or os.environ.get('FLOWER_OAUTH2_KEY'),
'secret': options.oauth2_secret or os.environ.get('FLOWER_OAUTH2_SECRET'),
'secret': oauth2_secret,
'redirect_uri': options.oauth2_redirect_uri or os.environ.get('FLOWER_OAUTH2_REDIRECT_URI'),
}

Expand Down