diff --git a/src/pages/Professor/index.tsx b/src/pages/Professor/index.tsx index 616c2a6..9aae024 100644 --- a/src/pages/Professor/index.tsx +++ b/src/pages/Professor/index.tsx @@ -59,7 +59,7 @@ function ProfessorInfo() { return response; } getProfessorName(); - }, [professor]); + }, [professor.id]); const handleChange = (event: SyntheticEvent, newValue: number) => { setValue(newValue); diff --git a/src/utils/auth.ts b/src/utils/auth.ts index 2aa8bb9..ac035f4 100644 --- a/src/utils/auth.ts +++ b/src/utils/auth.ts @@ -5,7 +5,7 @@ export const keycloakConfig = JSON.parse(process.env.REACT_APP_KEYCLOAK_JSON ?? export const authProviderProps: AuthProviderProps = { authority: `${keycloakConfig['auth-server-url']}/realms/${keycloakConfig.realm}`, client_id: keycloakConfig.resource, - redirect_uri: window.location.origin + process.env.PUBLIC_URL, + redirect_uri: `${window.location.origin}${window.location.pathname}`, post_logout_redirect_uri: window.location.origin + process.env.PUBLIC_URL, accessTokenExpiringNotificationTimeInSeconds: 30, client_authentication: 'client_secret_post',