Closed MikeSpencer42 closed 4 years ago
@MikeSpencer42 You will need to serve your app as a SPA app, but not a plain HTTP server, since there is no /implicit/callback actually there.
By a quick search, I don't see how to set it up in http-server
, but google suggested me another module which you may can give a try.
https://www.npmjs.com/package/http-server-spa
@shuowu That makes sense. I've had luck with http-server
in the past, but I now realize that I hadn't been using history mode in those apps. I ended up using servor to serve the app locally and it worked great. Thanks for the help!
If I build the custom-login version of the project (via
npm run build
) and then run a local http instance out of the dist folder (using Node'shttp-server
), the project loads as expected. However, when I try to login, the/implicit/callback
route throws a 404 error and the app fails to load.This also happens in my own project (which draws largely on this one). I haven't deployed it an actual server yet, but I need to do that soon and I'm worried that this issue will occur when I do.
Does anyone know why this is happening or how to handle this behavior?