This document summarizes the OIDC/OAuth authentication integration implemented for the GoSignals administrative interface.
internal/server/api_stream_management.goGET /.well-known/openid-configurationinternal/server/routers.gointernal/authUtil/auth_token.goOidcClaims struct for OIDC token claimsValidateOidcToken() function to validate Keycloak tokensValidateOidcAuthorizationMiddleware() for protected endpointsconfig/keycloak/realm/gosignals-realm.jsongosignalsadminui (public client with PKCE)oidc-client-ts@3.2.1 to package.jsonaxios@1.7.2 for API clientadminUI/src/lib/auth/authConfig.tsadminUI/src/lib/auth/AuthContext.tsxAuthProvider componentuseAuth() hookhandleCallback() and handleSilentCallback() utilitiesadminUI/src/components/UserMenu.tsxadminUI/src/components/AuthCallback.tsxadminUI/public/silent-callback.htmladminUI/src/lib/apiClient.tsadminUI/src/App.tsxadminUI/src/main.tsxadminUI/OIDC_SETUP.md1. User accesses adminUI (http://localhost:8899)
2. User clicks "Login" button
3. adminUI redirects to Keycloak (https://keycloak:9080/realms/gosignals)
4. User enters credentials on Keycloak page
5. Keycloak redirects back to adminUI with authorization code
6. adminUI exchanges code for tokens (access_token, refresh_token, id_token)
7. adminUI stores tokens in sessionStorage
8. User info displayed in header
9. API requests to goSignalsServer include bearer token
10. goSignalsServer validates token with Keycloak's public key
11. Before token expiration, adminUI silently refreshes token
12. On logout, adminUI clears tokens and redirects to Keycloak logout
KEYCLOAK_URL: Keycloak realm URL (default: https://keycloak:9080/realms/gosignals)VITE_KEYCLOAK_URL: Keycloak realm URL (default: https://keycloak:9080/realms/gosignals)VITE_GOSIGNALS_SERVER_URL: goSignalsServer URL (default: http://localhost:8888)internal/server/api_stream_management.go - Added OidcConfiguration handlerinternal/authUtil/auth_token.go - Added OIDC token validationconfig/keycloak/realm/gosignals-realm.json - Keycloak realm configurationadminUI/src/lib/auth/authConfig.ts - OIDC client configurationadminUI/src/lib/auth/AuthContext.tsx - Auth state managementadminUI/src/lib/apiClient.ts - API client with token interceptoradminUI/src/components/UserMenu.tsx - Login/logout UI componentadminUI/src/components/AuthCallback.tsx - OAuth callback handleradminUI/public/silent-callback.html - Silent token renewal pageadminUI/OIDC_SETUP.md - Setup and usage documentationOIDC_IMPLEMENTATION.md - This summary documentinternal/server/routers.go - Added OIDC discovery routeadminUI/package.json - Added oidc-client-ts and axios dependenciesadminUI/src/App.tsx - Added UserMenu to headeradminUI/src/main.tsx - Added AuthProvider wrapper and routingTo test the implementation:
docker-compose up -d
Access adminUI: http://localhost:8899
For production deployment:
For detailed setup instructions and troubleshooting, see adminUI/OIDC_SETUP.md.
(C)2026 Independent Identity Inc.