History

Merge pull request #955 from router-for-me/api

feat(codex): add subscription date fields to ID token claims

Luis Pater committed 10 months ago

Commit 80db2dc2 parents bc3195c 64943301 file · +6 −0Browse files

Unified · Split

internal/api/handlers/management/auth_files.go+6−0
@@ -460,6 +460,12 @@ func extractCodexIDTokenClaims(auth *coreauth.Auth) gin.H { · 459 unmodified lines
460 if v := strings.TrimSpace(claims.CodexAuthInfo.ChatgptPlanType); v != "" {460 if v := strings.TrimSpace(claims.CodexAuthInfo.ChatgptPlanType); v != "" {
461 result["plan_type"] = v461 result["plan_type"] = v
462 }462 }
463 if v := claims.CodexAuthInfo.ChatgptSubscriptionActiveStart; v != nil {
464 result["chatgpt_subscription_active_start"] = v
465 }
466 if v := claims.CodexAuthInfo.ChatgptSubscriptionActiveUntil; v != nil {
467 result["chatgpt_subscription_active_until"] = v
468 }
463 469
464 if len(result) == 0 {470 if len(result) == 0 {
465 return nil471 return nil