diff --git a/composables/useCustomAuth.ts b/composables/useCustomAuth.ts index 4665134..68d392c 100644 --- a/composables/useCustomAuth.ts +++ b/composables/useCustomAuth.ts @@ -36,7 +36,7 @@ export const useCustomAuth = () => { const authUrl = 'https://auth.portnimara.dev/realms/client-portal/protocol/openid-connect/auth?' + new URLSearchParams({ client_id: 'client-portal', - redirect_uri: 'https://client.portnimara.dev/auth/keycloak/callback', + redirect_uri: 'https://client.portnimara.dev/api/auth/keycloak/callback', response_type: 'code', scope: 'openid profile email', state: Math.random().toString(36).substring(2) diff --git a/server/api/auth/keycloak/callback.ts b/server/api/auth/keycloak/callback.ts index c0bb3a4..972371c 100644 --- a/server/api/auth/keycloak/callback.ts +++ b/server/api/auth/keycloak/callback.ts @@ -32,7 +32,7 @@ export default defineEventHandler(async (event) => { client_id: 'client-portal', client_secret: process.env.KEYCLOAK_CLIENT_SECRET || '', code: code as string, - redirect_uri: 'https://client.portnimara.dev/auth/keycloak/callback' + redirect_uri: 'https://client.portnimara.dev/api/auth/keycloak/callback' }).toString() }) as any