# 404 Implicit Callback GET on login - React SPA

**URL:** <https://devforum.okta.com/t/404-implicit-callback-get-on-login-react-spa/9883>\
**Category:** Questions\
**Created:** [June 22, 2020, 2:47pm UTC](https://devforum.okta.com/t/404-implicit-callback-get-on-login-react-spa/9883 "2020-06-22T14:47:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bryndonM](https://avatars.discourse-cdn.com/v4/letter/b/51bf81/32.png) [@bryndonM](https://devforum.okta.com/u/bryndonM)\
**Post date:** [June 22, 2020, 2:47pm UTC](https://devforum.okta.com/t/404-implicit-callback-get-on-login-react-spa/9883/1 "2020-06-22T14:47:51Z")

</div>

Hi, we’re getting a console GET Error on the implicit callback virtual route. This is happening only on login in a staged environment, not locally. While not a breaking change, the error isn’t ideal.

 ![image](https://global.discourse-cdn.com/oktadev/original/2X/8/8b0889638f605593b5ce09153526c69f413059fe.png)  
We’re using an Azure environment hosted as a static website via a storage account.  
I’ve set a base href on the document to “/” and also set any errors to go to index.html, as well as the default path is index.html.  
 ![image](https://global.discourse-cdn.com/oktadev/original/2X/1/1e8a3145468953e307b51d19275b6ebb94a8f6eb.png)

---

<div class="post-metadata">

**Author:** ![mraible](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/mraible/32/37_2.png) [@mraible](https://devforum.okta.com/u/mraible)\
**Post date:** [June 22, 2020, 3:09pm UTC](https://devforum.okta.com/t/404-implicit-callback-get-on-login-react-spa/9883/2 "2020-06-22T15:09:40Z")

</div>

If you’re getting a 404, it means your SPA configuration is not complete on your web server. You should never get a 404 from this route if you have it setup correctly. Rather, it should route the request to your index.html so React can handle it.

---

<div class="post-metadata">

**Author:** ![bryndonM](https://avatars.discourse-cdn.com/v4/letter/b/51bf81/32.png) [@bryndonM](https://devforum.okta.com/u/bryndonM)\
**Post date:** [June 22, 2020, 3:27pm UTC](https://devforum.okta.com/t/404-implicit-callback-get-on-login-react-spa/9883/3 "2020-06-22T15:27:07Z")

</div>

Good to know. I’ll look further into our web server setup. Thank you for the quick response.

---

<div class="post-metadata">

**Author:** ![MannyD](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@MannyD](https://devforum.okta.com/u/MannyD)\
**Post date:** [June 22, 2021, 3:57am UTC](https://devforum.okta.com/t/404-implicit-callback-get-on-login-react-spa/9883/4 "2021-06-22T03:57:21Z")

</div>

I was also running into this issue with a Vue SPA when running in a docker container. For me, here is what worked.

1. Make sure router is using history mode.
2. 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.

```auto
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;
        }
    }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [February 8, 2024, 6:33pm UTC](https://devforum.okta.com/t/404-implicit-callback-get-on-login-react-spa/9883/5 "2024-02-08T18:33:13Z")

</div>

Closed on February 8, 2024, 6:33pm UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
