The reason for returning 404 on production environment is that /implicit/callback
is a virtual path generated from index.html file. On local environment there should not be any issues resolving the endpoint, however, when deploying to production, the web server will try to resolve the endpoint physically.
To resolve this issue, your back-end must be configured to redirect requests coming on /implicit/callback
endpoint to index.html.