Skip to content

feat(client): add Verified ID status hook and API client - #206

Open
Philivanei wants to merge 2 commits into
verified-id/2-server-enforcementfrom
verified-id/3-client-status
Open

Philivanei wants to merge 2 commits into
verified-id/2-server-enforcementfrom
verified-id/3-client-status

Conversation

@Philivanei

@Philivanei Philivanei commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Third layer of the split of #198.

  • Add the useVerifiedIdStatus hook and its helpers. It loads the status, derives the validity window from server time and retries after a verification until the fresh timestamp is visible.
  • Add the getVerifiedIdStatus API call and the related types.

Why

The UI layer above needs the status as data. Nothing is rendered differently yet.

Testing

tsc --noEmit passes.

🤖 Generated with Claude Code

Add the useVerifiedIdStatus hook, the status helpers, the API call for
GET /api/me/verifiedId/status and the related types.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Philivanei
Philivanei added this pull request to stack #208 November 9, 2026 09:18
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

🌈 zizmor scan results

✅ zizmor found no issues in this repository's GitHub Actions.

@Philivanei
Philivanei marked this pull request as ready for review November 9, 2026 09:18
@Philivanei
Philivanei requested a review from a team as a code owner November 9, 2026 09:18
Copilot AI balanced review requested due to automatic review settings November 9, 2026 09:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The verification-status hook can schedule retries after unmount when an in-flight status request settles, allowing authenticated requests to continue after cleanup.

1 open issue
What changed in this PR

Adds the client data layer for recent Verified ID checks, preparing for the UI enforcement described in #198 without changing rendered behavior.

Changes:

  • Adds an authenticated status API call and related response and UI types.
  • Introduces a status hook with polling, server-clock-based expiry, and post-verification retries.
  • Adds timestamp parsing, validity checking, and display-formatting helpers.
File Description
src/​MyWorkID.Client/​src/​types.ts Defines verification status types and future UI integration props.
src/​MyWorkID.Client/​src/​services/​api-service.ts Adds the Verified ID status API request.
src/​MyWorkID.Client/​src/​lib/​verified-id-status.ts Adds timestamp, duration, and validity helpers.
src/​MyWorkID.Client/​src/​hooks/​use-verified-id-status.ts Manages status loading, refreshes, retries, and expiry.

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants