mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2025-12-14 07:26:44 +03:00
Updates to SSO Testing
This commit is contained in:
@@ -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,
|
||||
});
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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" },
|
||||
|
||||
Reference in New Issue
Block a user