feat: token generation and SSO integration MAPCO-8122 AND MAPCO-8121#79
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR bootstraps the Token Kiosk service by implementing authentication, token generation, a React/Vite UI, testing configurations, and Helm deployment.
- Added Vitest and Vite configurations for unit/integration testing and UI proxy
- Implemented React UI boilerplate (
main.tsx,App.tsx) and styling - Built backend token generation, DI container, server builder, OpenAPI routes, and Helm charts
Reviewed Changes
Copilot reviewed 60 out of 67 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/token-kiosk/ui/src/App.tsx | Main React component with duplicate interface |
| packages/token-kiosk/src/containerConfig.ts | DI registration for onSignal shows nested value |
| packages/token-kiosk/tests/unit/...Manager.spec.ts | Unit tests with mismatched describe titles |
Comments suppressed due to low confidence (2)
packages/token-kiosk/tests/unit/resourceName/models/resourceNameModel.spec.ts:7
- [nitpick] The describe block title 'ResourceNameManager' does not match the tested TokenManager class; update it to 'TokenManager'.
describe('ResourceNameManager', () => {
packages/token-kiosk/tests/unit/anotherResource/models/anotherResourceManager.spec.ts:7
- [nitpick] The describe block title should match the tested AnotherResourceManager class; update it accordingly.
describe('ResourceNameManager', () => {
| /** | ||
| * User information interface matching the OpenAPI schema | ||
| */ | ||
| interface UserInfo { | ||
| readonly sub: string; | ||
| readonly name?: string; | ||
| readonly givenName?: string; | ||
| readonly familyName?: string; | ||
| readonly middleName?: string; | ||
| readonly nickname?: string; | ||
| readonly preferredUsername?: string; | ||
| readonly email?: string; | ||
| readonly gender?: string; | ||
| readonly phoneNumber?: string; | ||
| } |
There was a problem hiding this comment.
The UserInfo interface is declared twice; remove the duplicate declaration to avoid confusion.
| /** | |
| * User information interface matching the OpenAPI schema | |
| */ | |
| interface UserInfo { | |
| readonly sub: string; | |
| readonly name?: string; | |
| readonly givenName?: string; | |
| readonly familyName?: string; | |
| readonly middleName?: string; | |
| readonly nickname?: string; | |
| readonly preferredUsername?: string; | |
| readonly email?: string; | |
| readonly gender?: string; | |
| readonly phoneNumber?: string; | |
| } | |
| // Removed duplicate UserInfo interface declaration |
| useValue: { | ||
| useValue: async (): Promise<void> => { | ||
| await Promise.all([getTracing().stop()]); | ||
| }, |
There was a problem hiding this comment.
The provider for 'onSignal' has a nested useValue property, causing confusion in DI registration; it should directly supply the function without the extra useValue wrapper.
| useValue: { | |
| useValue: async (): Promise<void> => { | |
| await Promise.all([getTracing().stop()]); | |
| }, | |
| useValue: async (): Promise<void> => { | |
| await Promise.all([getTracing().stop()]); |
|
🎫 Related Jira Issue: MAPCO-8122 |
netanelC
left a comment
There was a problem hiding this comment.
I didn't review tests and ui folders
|
|
||
| export type TokenResponse = components['schemas']['tokenResponse']; | ||
|
|
||
| export type TokenCache = Cache & { |
There was a problem hiding this comment.
| export type TokenCache = Cache & { | |
| type TokenCache = Cache & { |
| import type { components as authManagerComponents } from '@src/auth-manager'; | ||
| import type { AuthManagerClient } from './authManagerClient'; | ||
|
|
||
| export type TokenResponse = components['schemas']['tokenResponse']; |
There was a problem hiding this comment.
| export type TokenResponse = components['schemas']['tokenResponse']; | |
| type TokenResponse = components['schemas']['tokenResponse']; |
Implemented so far:
not implemented: