impl(#406): SSO 4a/4: Login SSO status - data layer (split from #355) - #422
Conversation
Assisted-by: claude-sonnet-5 (agent)
There was a problem hiding this comment.
Pull request overview
Adds the Admin UI data-layer method needed by the login flow to determine whether SSO is enforced for the current tenant, along with initial unit tests and new i18n copy for an “SSO sign-in” action.
Changes:
- Added
authService.getSsoStatus()callingGET /api/v1/auth/sso-statusand returning{ enforceSso }. - Added unit tests covering the success (
enforceSso: true) and error-propagation paths forgetSsoStatus. - Added
auth.signInWithSsotranslation key toen.jsonandru.json(butkk.jsonis currently missing it).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| apps/admin/src/services/auth-service.ts | Adds getSsoStatus() data-layer method for login SSO enforcement awareness. |
| apps/admin/src/tests/services/auth-service.test.ts | Adds unit tests for the new getSsoStatus() method. |
| apps/admin/src/i18n/locales/en.json | Adds auth.signInWithSso English label. |
| apps/admin/src/i18n/locales/ru.json | Adds auth.signInWithSso Russian label. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Add missing auth.signInWithSso key to kk.json (locale-sync drift Copilot flagged - en/ru had it, kk was missing it). - Move the hardcoded /api/v1/auth/sso-status path into API_ENDPOINTS.auth.ssoStatus(), matching every other auth-service method's use of the centralized endpoint builder. - Add the symmetric enforceSso: false success-path test for getSsoStatus, mirroring getRegistrationStatus's true/false coverage. Assisted-by: claude-opus-5 (agent)
|
@claude review |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
apps/admin/src/services/auth-service.ts:64
getSsoStatus()depends on the backend routeGET /api/v1/auth/sso-status(tracked in #414, currently still open). As-is, this looks ready to be consumed by UI code, but will 404 if merged/deployed before the backend endpoint lands. Add an explicit note in the docblock (or TODO with issue link) to prevent accidental early use/merge.
/**
* Resolve whether the current tenant (by host/subdomain) has made SSO
* mandatory. Unauthenticated, same pre-auth shape as getRegistrationStatus().
*/
|
@claude review (Re-triggering — the previous |
|
Reviewed 6 files (frontend SSO-status data layer); no real-impact issues found. The new |
…r-ref (#426) ## Summary - `claude-review.yml`'s concurrency group used `github.ref`, which resolves to the default branch (not the PR) for `issue_comment`/`pull_request_review_comment` events — every comment-triggered review across the repo shared one queue slot, so a review on one PR could silently evict a still-queued review on a different PR. - Reproduced live on 2026-08-28: `@claude review` on PR #422 and #423 within ~26s of each other; #422's queued run was silently cancelled. - Scopes the group by `github.event.issue.number` / `github.event.pull_request.number`, falling back to `github.ref`. ## Test plan - [x] `actionlint` clean on the changed file - [ ] `Test Workflows` CI job (YAML syntax validation) passes Closes #425
Agent-generated scaffold for issue #406 (model: claude-sonnet-5).
Added authService.getSsoStatus() (unauthenticated GET to /api/v1/auth/sso-status, matching #414's contract), its success/error-propagation test cases, and the auth.signInWithSso i18n key across en/ru/kk locales.
Review, fill in TODO sections, run tests, and merge when ready (Gate 3).
Refs #406
Assisted-by: claude-sonnet-5 (agent)