I used to develop a website that fetches data with kerberos authentication. Unfortunately, when we used react as a frontend framework and tried to implement this code https://github.com/jlguenego/react-sso-example. we could not run it. Firstly, we tried the code provided in the example as it is, but no hope, after that we tried npm audit fix and it managed to get the website working, but when we click "Connect with SSO" button, this error pops up in the console caught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
ANy solution for this error "Unexpected token '<', "<!DOCTYPE "... is not valid JSON"
The error
Unexpected token '<', "<!DOCTYPE "... is not valid JSONis a result of the sample project being built to serve as static content to thenodejsexpress server as seen hereSo it won't work with the provided backend when you run it in the development server (
npm run start)To run the sample project. After running the audit fix, Run
npm run buildThe build will be available in the
/buildfolder.Restart the backend server and the sample project will be available on the backend port (
localhost:3500).