Skip to content

feat(admin): add social provider management - #666

Merged
pcfreak30 merged 4 commits into
developfrom
feat/admin-social-providers
Sep 2, 2026
Merged

feat(admin): add social provider management#666
pcfreak30 merged 4 commits into
developfrom
feat/admin-social-providers

Conversation

@pcfreak30

@pcfreak30 pcfreak30 commented Sep 2, 2026

Copy link
Copy Markdown
Member

Adds admin support for social login provider management, backed by the admin social provider service in portal-sdk v0.1.71.

What

  • pinner admin social-providers with list, get, create, update, delete, enable, disable
  • MCP surface: admin_social_providers_* catalog ops (progressive disclosure under admin)
  • Core service follows the existing admin service pattern (lazy token exchange, shared admin service base)
  • Update uses the v0.1.71 patch semantics: only supplied fields change, an omitted client-secret keeps the stored secret
  • Delete is gated behind confirm=true / --force

Notes

  • Client secrets are never included in list/get output (the portal does not return them).

This pull request adds comprehensive admin functionality for managing social login providers (like GitHub, Google, etc.) through both the CLI and MCP tool interfaces.

Key Changes

New Social Provider Admin Operations

Added seven new admin operations for social provider management:

  • List: View all configured social login providers with pagination support
  • Get: Retrieve a single provider by ID
  • Create: Add new social login provider configurations (OAuth2 endpoints, client credentials, and display metadata)
  • Update: Patch existing provider configurations with partial updates (only supplied fields are changed; omitted fields retain their current values)
  • Delete: Remove provider configurations (requires explicit confirm=true confirmation)
  • Enable/Disable: Control whether providers can be used for login

Service Layer Implementation

Added a new SocialProviderAdminService interface with a concrete implementation using the portal SDK. This service:

  • Requires admin authentication before operations
  • Lazily initializes the API client with token exchange
  • Follows the same patterns as existing admin services (billing, websites, etc.)

CLI Integration

  • Added a new social-providers subcommand under the admin parent command
  • The CLI command tree is compiled from the operation catalog, ensuring consistency between the CLI and MCP tool surfaces
  • Updated admin help text to document the new social provider operations

Security and Safety Features

  • Client secrets are never returned by the API (list/get operations omit them)
  • Delete operations are flagged as destructive and require confirmation
  • Update operations use nullable types to distinguish between "not provided" and "explicitly set to zero/false", preventing accidental configuration changes
  • All operations require admin authentication

Testing

Comprehensive test coverage includes:

  • Operation registration in the catalog
  • Authentication gating
  • Input validation for required fields
  • Request forwarding and result wrapping
  • Partial update semantics (only supplied fields are patched)
  • Delete confirmation requirement
  • Enable/disable functionality
  • CLI command tree structure and mounting

The feature provides administrators with complete control over social login provider configurations, integrating cleanly with the existing admin operational framework.

@kody-ai

This comment has been minimized.

Comment thread internal/catalogops/admin_social_providers.go Outdated
Comment thread internal/catalogops/admin_social_providers_test.go
@kody-ai

This comment has been minimized.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Code Coverage Report

Total Coverage: 50.1%

Generated from commit: 54a7f62
Repository: LumeWeb/pinner-cli

Comment thread internal/catalogops/admin_social_providers.go Outdated
@kody-ai

kody-ai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Kody Review Complete

Great news! 🎉
No issues were found that match your current review configurations.

Keep up the excellent work! 🚀

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug
Performance
Security
Business Logic

Access your configuration settings here.

@pcfreak30
pcfreak30 merged commit e9ac2e1 into develop Sep 2, 2026
13 checks passed
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.

1 participant