refactor(auth): use API base URL directly for OIDC endpoints
Remove SECUIRD_OIDC constant that stripped /api/v1 from the base URL. OIDC endpoints are now served under the API path directly.
This commit is contained in:
@@ -28,7 +28,6 @@ import { OAuthProvider } from "@/lib/oauth";
|
||||
type LoginStep = 'credentials' | 'totp' | 'webauthn' | 'passkey-email' | 'mfa-enrollment' | 'mfa';
|
||||
|
||||
const SECUIRD_API = import.meta.env.VITE_API_BASE_URL ?? 'http://localhost:5000/api/v1';
|
||||
const SECUIRD_OIDC = SECUIRD_API.replace(/\/api\/v1\/?$/, '');
|
||||
|
||||
/**
|
||||
* Complete an OIDC authorization flow after the user has authenticated.
|
||||
@@ -36,7 +35,7 @@ const SECUIRD_OIDC = SECUIRD_API.replace(/\/api\/v1\/?$/, '');
|
||||
* the auth code and returns the redirect URL for the calling application.
|
||||
*/
|
||||
async function completeOidcFlow(oidcSessionId: string, token: string): Promise<string> {
|
||||
const res = await fetch(`${SECUIRD_OIDC}/oidc/complete`, {
|
||||
const res = await fetch(`${SECUIRD_API}/oidc/complete`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ oidc_session_id: oidcSessionId, token }),
|
||||
|
||||
Reference in New Issue
Block a user