Closed jmpokar closed 2 years ago
Hi @jmpokar, thank you for the issue,
I have to finish a pull request for managing hash routing. https://github.com/AxaGuilDEv/react-oidc/pull/781
I think it will do what you need. I finished it as soon as i can.
Hi @guillaume-chervet, Thanks for quick response. I tried to set this with idp, redirect_uri: window.location.origin+"#/authentication/callback but our idp doesn't support "#" It gives error "Redirect URI must not include a fragment component."
could you please suggest some alternative/work around to this. Thanks!
I think you need to configure well your node application. Did you tried that ? https://stackoverflow.com/questions/65312400/simple-no-frameworks-node-js-server-to-host-a-spa-react-app
Hi @jmpokar , I have to finish a pullrequest to support "#" , do you need it quickly?
It is working pretty well in the last version https://github.com/AxaGuilDEv/react-oidc/commit/a52d83787b64e149a0a05aa20dcb0f55a9430859
May you confirm if it is work for you?
Hi @jmpokar , thank you for the issue. I think it is working fine now. I close the issue, feel free to reopen it if needed.
Issue and Steps to Reproduce
Configuration: redirect_uri: window.location.origin+"/authentication/callback", silent_redirect_uri: window.location.origin+"/authentication/silent-callback",
Code is retrieved fine but when it hits redirect_uri, call comes to server and I don't have any endpoint that handles "authentication/callback?code=.." so i get "Cannot GET /authentication/callback"
later I have added the endpoint in server/app.ts app.use('/authentication/callback', (req, res) => { res.sendFile(path.join(__dirname, '..', 'build', 'index.html')); })
but this fails the other static endpoints by changing the path to /authentication. Example: http://localhost:3000/authentication/env-config.js
I am new to OAuth and not sure where exactly authentication/callback is defined and what is the correct way i should handle this scenario? appreciate any help on this, thanks!
Note: It is React Single page application .
Versions
Using "@axa-fr/react-oidc": "5.7.2",