675b60d858
Build backend images / build content-svc (push) Failing after 1m2s
Build backend images / build file-svc (push) Failing after 3m11s
Build backend images / build gateway (push) Failing after 5m39s
Build backend images / build identity-svc (push) Failing after 38s
Build backend images / build notification-svc (push) Failing after 2m0s
Build backend images / build render-svc (push) Failing after 58s
Build backend images / build studio-svc (push) Failing after 58s
Backend (identity-svc):
- oauth_config table (mig 22) + OAuthConfig entity
- OAuthService: admin config CRUD + Google authorization-code flow (build consent
URL, exchange code, fetch userinfo, find/create RegisterMode.Google user, issue
session via AuthService.IssueOAuthSessionAsync)
- AuthController: GET /v1/auth/google/{start,callback} (public); tokens handed to
frontend via URL fragment
- AdminController: GET/PUT /v1/admin/oauth/{provider} (admin, secret masked)
Frontend:
- "ورود با گوگل" button on /auth → identity start endpoint
- /auth/callback reads fragment tokens → /api/auth/oauth-session sets httpOnly cookies
- /admin/integrations: Google client_id/secret/redirect_uri + enable, with setup guide
- nav + fa/en labels
Client ID/Secret are configured entirely in the admin panel — no redeploy needed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
40 lines
2.0 KiB
C#
40 lines
2.0 KiB
C#
namespace FlatRender.IdentitySvc.Models;
|
|
|
|
// ── CRM analytics (acquisition / conversion funnel) ──────────────────────────
|
|
|
|
public record CrmDailyPoint(string Date, int Signups, int Buyers, long RevenueMinor);
|
|
|
|
public record CrmAnalyticsResponse(
|
|
int TotalSignups,
|
|
int Buyers,
|
|
int NonBuyers,
|
|
double ConversionRate,
|
|
long RevenueMinor,
|
|
int PayingUsersAllTime,
|
|
List<CrmDailyPoint> Daily
|
|
);
|
|
|
|
// ── OAuth provider config ─────────────────────────────────────────────────────
|
|
|
|
public record OAuthConfigResponse(string Provider, string? ClientId, string? RedirectUri, bool Enabled, bool HasSecret);
|
|
|
|
public record UpsertOAuthConfigRequest(string? ClientId, string? ClientSecret, string? RedirectUri, bool Enabled);
|
|
|
|
// ── Plan statistics breakdown ────────────────────────────────────────────────
|
|
|
|
public record PlanStatRow(string PlanName, int Total, int Active, long RevenueMinor);
|
|
|
|
// ── CRM notes / tags per customer ────────────────────────────────────────────
|
|
|
|
public record UserCrmResponse(string[] Tags, string? Note, string Status);
|
|
|
|
public record UpsertUserCrmRequest(string[]? Tags, string? Note, string? Status);
|
|
|
|
// ── User admin power-actions ─────────────────────────────────────────────────
|
|
|
|
public record SetBalanceRequest(long AmountMinor, bool Add); // Add=false → set absolute
|
|
public record ResetPasswordRequest(string NewPassword);
|
|
public record AddChargeRequest(int Seconds, int RenderCount); // grant render seconds / daily renders
|
|
public record GrantPlanDaysRequest(Guid PlanId, int Days);
|
|
public record SetFlagRequest(bool Enabled);
|