From df517cfbfafc6a4e4a625b9bf70dfca256a0f064 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Wed, 25 Feb 2026 14:36:28 -0600 Subject: [PATCH] fix: expose config for farmOS OAuth2 client_id and scope refs: #3 --- src/wuttafarm/farmos/handler.py | 6 +++++ .../web/templates/appinfo/configure.mako | 22 +++++++++++++++++++ src/wuttafarm/web/views/auth.py | 5 +++-- src/wuttafarm/web/views/settings.py | 13 ++++++++++- 4 files changed, 43 insertions(+), 3 deletions(-) diff --git a/src/wuttafarm/farmos/handler.py b/src/wuttafarm/farmos/handler.py index 6eee14f..e905f92 100644 --- a/src/wuttafarm/farmos/handler.py +++ b/src/wuttafarm/farmos/handler.py @@ -94,3 +94,9 @@ class FarmOSHandler(GenericHandler): return f"{base}/{path}" return base + + def get_oauth2_client_id(self): + return self.config.get("farmos.oauth2.client_id", default="farm") + + def get_oauth2_scope(self): + return self.config.get("farmos.oauth2.scope", default="farm_manager") diff --git a/src/wuttafarm/web/templates/appinfo/configure.mako b/src/wuttafarm/web/templates/appinfo/configure.mako index 3760577..8dc5e8a 100644 --- a/src/wuttafarm/web/templates/appinfo/configure.mako +++ b/src/wuttafarm/web/templates/appinfo/configure.mako @@ -14,6 +14,28 @@ + + + + + + + + + + + + + + + + + +