I was also running into this issue with a Vue SPA when running in a docker container. For me, here is what worked.
- Make sure router is using history mode.
- Add a nginx config file and at the very least, add the following to allow the redirect to the callback url. In my case 'login/callback.
http {
server {
listen 80;
root /usr/share/nginx/html;
include /etc/nginx/mime.types;
location / {
try_files $uri /index.html;
}
location /login/callback/* {
try_files $uri /index.html;
}
}
}