After log in with credentials and being redirected back to my website, keycloak request returns 401.
Note! Im running keycloak locally using docker container
This is my code for handling auth within react-js:
` const [isLogin, setLogin] = useState(false);
useEffect(() => { const _kc = new Keycloak({ realm: "Manter", clientId: "manter", url: "http://localhost:4000/", });
_kc
.init({
onLoad: "login-required",
checkLoginIframe: false,
})
.then((res) => setLogin(res));`
I have tried connecting to local host as well as 127.0.0.1:4000. I have tried enabling front-end url and also played around with auth settings within keycloak itself.