From 4577c73e468b62c4ef3edac41f17bd292c00bdf7 Mon Sep 17 00:00:00 2001 From: Lucas Daniel Costa Da Silva Date: Mon, 30 Oct 2023 09:21:52 -0300 Subject: [PATCH 1/2] fix redirect uri to actual page --- src/utils/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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', From 2719ffd8218fddcd4228aacd7dc67a0d13e5c5f8 Mon Sep 17 00:00:00 2001 From: Lucas Daniel Costa Da Silva Date: Mon, 30 Oct 2023 09:22:09 -0300 Subject: [PATCH 2/2] prevent render loop inside useEffect --- src/pages/Professor/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);