fix and update

This commit is contained in:
lendry
2026-06-29 15:08:26 +03:00
parent 01e4917acf
commit e127df3d6d
8 changed files with 57 additions and 16 deletions

View File

@@ -14,6 +14,7 @@ import { Input } from '@/components/ui/input';
import { OAuthClient, OAuthScope, apiFetch } from '@/lib/api';
import { getAdminLandingPath } from '@/lib/admin-access';
import { buildAuthorizeUrl, buildOAuthEndpoints, resolveFrontendBase, resolveOAuthApiBase } from '@/lib/oauth-url';
import { DEFAULT_PUBLIC_API_URL, DEFAULT_PUBLIC_FRONTEND_URL } from '@/lib/project-domains';
export default function AdminOAuthPage() {
const router = useRouter();
@@ -26,8 +27,8 @@ export default function AdminOAuthPage() {
const [dialogOpen, setDialogOpen] = useState(false);
const [selectedClient, setSelectedClient] = useState<OAuthClient | null>(null);
const [secretDialog, setSecretDialog] = useState<{ clientId: string; clientSecret: string } | null>(null);
const [oauthApiBase, setOauthApiBase] = useState('http://localhost:3002/idp-api');
const [frontendBase, setFrontendBase] = useState('http://localhost:3002');
const [oauthApiBase, setOauthApiBase] = useState(DEFAULT_PUBLIC_API_URL);
const [frontendBase, setFrontendBase] = useState(DEFAULT_PUBLIC_FRONTEND_URL);
const [projectName, setProjectName] = useState('MVK ID');
const [form, setForm] = useState({ name: '', redirectUris: '', type: 'CONFIDENTIAL', selectedScopes: ['openid', 'profile', 'email'] as string[] });