acc_invoices: вход через Keycloak (PKCE, Google, только @khbuild.pro) вместо вставки токена
All checks were successful
ci / test (push) Successful in 54s
ci / deploy (push) Successful in 3m14s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-04 14:16:11 +03:00
parent 16e9b2c085
commit 4a351306bb
7 changed files with 106 additions and 27 deletions

View File

@@ -101,6 +101,9 @@ export function buildApi(deps: ApiDeps): FastifyInstance {
return row;
}
// настройки входа для браузера (без авторизации): куда перенаправлять на Keycloak
app.get("/api/auth-config", async () => ({ issuer: settings.auth.issuer ?? null, clientId: settings.auth.clientId }));
app.get("/api/me", async (req) => {
const a = await need(req);
return { person_id: a.personId, name: a.displayName, roles: a.roles, is_staff: isStaff(a), filters: QUICK_FILTERS };