Use rp-name for frontend branding

This commit is contained in:
Leo Vasanko
2025-09-01 18:48:59 -06:00
parent 0b285e6ef0
commit 7036338b33
7 changed files with 37 additions and 5 deletions

View File

@@ -53,6 +53,18 @@ def register_api_routes(app: FastAPI):
s = await authz.verify(auth, perm)
return {"valid": True, "user_uuid": str(s.user_uuid)}
@app.get("/auth/settings")
async def get_settings():
"""Return server runtime settings safe for public consumption.
Provides relying party metadata used by the frontend to brand UI.
"""
pk = global_passkey.instance
return {
"rp_id": pk.rp_id,
"rp_name": pk.rp_name,
}
@app.post("/auth/user-info")
async def api_user_info(reset: str | None = None, auth=Cookie(None)):
"""Get user information.