Skip to content

feat(auth): implement hybrid sync (JIT OIDC login + Webhook) for DOS.Me organizations #3

Description

@JOY

Overview

Implement Crove OS Hybrid Sync standard (JIT + Webhook) for Crove Cal (Cal.com) to synchronize Users, Profiles, and Organizations/Teams from DOS.Me ID.

Project: Crove

Subtasks

  • OIDC JIT Sync:
    • Add DOS.Me OIDC provider support in NextAuth options.
    • Read sub, email, name, picture, organizations claims from OIDC userinfo.
    • Automatically create/update User and provision Team (isOrganization: true) and Membership on login.
  • Webhook Event-driven Sync:
    • Implement /api/webhooks/dos-org-sync endpoint with HMAC signature verification (X-DOS-Signature: sha256=...).
    • Handle events: org.created, org.updated, org.deleted, org.member_added, org.member_removed.
    • Map organizations to Cal.com Team (isOrganization: true) and members to Membership (OWNER, ADMIN, MEMBER).
  • UI Integration:
    • Add SSO Login button for DOS.Me / Crove ID.
  • Verification & Testing:
    • Run type checks & verify endpoints.

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