diff --git a/Dockerfile b/Dockerfile index 4b6488eb3e7457f392489af190959530af2587e6..e24a50794f125322931332fc40b84478c249b2cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,8 +23,8 @@ EXPOSE 3000 ENV PORT 3000 ENV HOSTNAME "0.0.0.0" - ENV EXPRESS_PUBLIC_API_URL=http://localhost:8000/api +ENV KEY_CLOAK_CLIENT_SECRET CMD ["npm", "run", "dev"] #ENV EXPRESS_PUBLIC_API_URL=http://localhost:8000/api diff --git a/pages/api/auth/[...nextauth].ts b/pages/api/auth/[...nextauth].ts index aae8fd3e5ed95596f28de18068c76bcfbde0977a..1bf718c3f69a9c29e76ba3ec5669a755eba1a645 100644 --- a/pages/api/auth/[...nextauth].ts +++ b/pages/api/auth/[...nextauth].ts @@ -15,10 +15,13 @@ export const authOptions = { providers: [ // !!! Should be stored in .env file. KeycloakProvider({ - clientId: 'fdo-manager-webui', - clientSecret: 'ay7l6jhECSohAZsEp6HYOaoXdARMQCei', - issuer: 'http://localhost:8000/auth/realms/fdo-manager', - authorization: { params: { scope: 'openid profile' } }, + //clientId: 'fdo-manager-webui', + clientId: 'gwdg-fdoman-test', + //clientSecret: 'ay7l6jhECSohAZsEp6HYOaoXdARMQCei', + clientSecret: process.env.KEY_CLOAK_CLIENT_SECRET, + // issuer: 'http://localhost:8000/auth/realms/fdo-manager', + issuer: 'https://keycloak.sso.gwdg.de/auth/realms/academiccloud', + //authorization: { params: { scope: 'openid profile email' } }, profile (profile) { console.log('### profile', profile, '### ### ###') return {