Closed pavankjadda closed 6 months ago
After debugging for hours, I figured out the issue. I have custom 404 page that decodes the if URL is encoded and redirects to decoded version. This is designed for application URLs. But it also applying OIDC callback, hence the error. Added exception for OIDC URLs and it fixed the issue.
@guillaume-chervet question. The URL is being coded after authentication. How can we prevent this? For example
/employee?id=1001
/employee%3Fid%3D1001
How can I prevent step 3? Is this being done by React Router in the library?
Hi @pavankjadda , very sorry for the delay. Did you solve your problem? How did you solve it?
After debugging for hours, I figured out the issue. I have custom 404 page that decodes the if URL is encoded and redirects to decoded version. This is designed for application URLs. But it also applying OIDC callback, hence the error. Added exception for OIDC URLs and it fixed the issue.
After debugging for hours, I figured out the issue. I have custom 404 page that decodes the if URL is encoded and redirects to decoded version. This is designed for application URLs. But it also applying OIDC callback, hence the error. Added exception for OIDC URLs and it fixed the issue.
Issue and Steps to Reproduce
In my next.js project, I use
@axa-fr/react-oidc
to integrate with OIDC server. In my local setup, when I first open any webpage, it redirects me to login page and after successful login, it shows "Error authentication" message. I do not see this error when deployed to DEV or PRODVersions
7.13.12
Screenshots
Expected
The redirection should work as expected
Actual
Says "State not valid" in dev tools and "Error authentication" in UI