While running Angular dist , gettiing "GET /implicit/callback" Error (404): "Not found"

Hello there, I ran okta configuration successfully with ng serve, but I am getting a problem while running dist, it gets stuck and throws error “GET /implicit/callback” Error (404): “Not found” on CLI, I am not getting, why it is not working with dist if it worked fine with ng serve.

@mraible, any help would be appreciated, Thanks in advance.

If you’re putting a SPA into production (which is similar to what you’re doing), you need to do a few things. First of all, you need to route all requests to index.html. Secondly, you need to use HTTPS. Here’s a guide:


Quick solution for Angular is to use http-server-spa:


After installing it and building your app, run:

http-server-spa dist/<your-app-name> index.html 4200

Hope this helps!


Thanks, @mraible for the quick response, I tried the http-server-spa " solution and it worked.