Updates to SSO Testing

This commit is contained in:
Arunavo Ray
2025-07-26 19:45:20 +05:30
parent 3ff15a46e7
commit 1f6add5fff
6 changed files with 275 additions and 12 deletions

View File

@@ -102,7 +102,7 @@ export function SSOSettings() {
setIsLoading(true);
try {
const [providersRes, headerAuthStatus] = await Promise.all([
apiRequest<SSOProvider[]>('/auth/sso/register'),
apiRequest<SSOProvider[]>('/sso/providers'),
apiRequest<{ enabled: boolean }>('/auth/header-status').catch(() => ({ enabled: false }))
]);
@@ -177,7 +177,7 @@ export function SSOSettings() {
requestData.identifierFormat = providerForm.identifierFormat;
}
const newProvider = await apiRequest<SSOProvider>('/auth/sso/register', {
const newProvider = await apiRequest<SSOProvider>('/sso/providers', {
method: 'POST',
data: requestData,
});

View File

@@ -36,7 +36,7 @@ export function useAuthMethods() {
const loadAuthMethods = async () => {
try {
// Check SSO providers
const providers = await apiRequest<any[]>('/auth/sso/register').catch(() => []);
const providers = await apiRequest<any[]>('/sso/providers').catch(() => []);
const applications = await apiRequest<any[]>('/sso/applications').catch(() => []);
setAuthMethods({

View File

@@ -147,11 +147,9 @@ export async function GET(context: APIContext) {
// doesn't provide a built-in API to list SSO providers
// This will be implemented once we update the database schema
// Return empty array for now - frontend expects array not object
return new Response(
JSON.stringify({
message: "SSO provider listing not yet implemented",
providers: []
}),
JSON.stringify([]),
{
status: 200,
headers: { "Content-Type": "application/json" },