Skip to content

feat(auth): implement Crove OS Hybrid Sync (DOS.Me OIDC + Org Webhook Sync) #4

Description

@JOY

Overview

Implement Crove OS Hybrid Sync Standard (JIT OIDC Login + Real-time Webhooks) for Crove Cal.

Tasks

  1. OIDC Provider Configuration (JIT Sync):
    • Add DOS.Me OIDC provider into NextAuth options (packages/features/auth/lib/next-auth-options.ts).
    • Extract user identity (sub, email,
      ame, picture) and organizations claim on login.
    • Provision/upsert local User, Profile, and Team (Organization) + Membership.
  2. Webhook Sync Endpoint (Real-time Sync):
    • Create route �pps/web/app/api/webhooks/dos-org-sync/route.ts (or Pages router handler) with HMAC SHA-256 verification (X-DOS-Signature).
    • Handle events: org.created, org.updated, org.deleted, org.member_added, org.member_removed.
    • Update Team and Membership models in cal schema accordingly.
  3. UI Integration:
    • Add DOS.Me ID login button on /auth/login.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions