add user scripting with lua

This commit is contained in:
Lukas Werner
2025-07-03 17:07:35 -07:00
parent 5d2b82876d
commit 3920b8913d
8 changed files with 151 additions and 5 deletions
+7 -2
View File
@@ -3,6 +3,7 @@ guarded_paths = ["/"]
# A list of all allowed users. For GitHub it is a list of usernames.
# For Google it is a list of emails
allowed_users = ["lukasmwerner"]
redirect_url = "http://localhost:3000/oauth/callback"
[upstream]
addr = "http://localhost:8080"
@@ -11,7 +12,11 @@ program = "rezepte"
args = []
[provider]
kind = "github" # can `google` or `github`
kind = "OAuth2" # can `google` or `github` or custom via an undefined name
auth_url = "https://github.com/login/oauth/authorize"
token_url = "https://github.com/login/oauth/access_token"
scopes = ["read:user"]
client_id = "<CHANGE_ME>"
client_secret = "<CHANGE_ME>"
redirect_url = "http://localhost:3000/oauth/callback"
# lua script that contains the function: `get_user_info(token)` and returns a string
info_script = "get_user_info.lua"