# Vue.js with Okta Auth. 404 on login redirect in Heroku

**URL:** <https://devforum.okta.com/t/vue-js-with-okta-auth-404-on-login-redirect-in-heroku/6725>\
**Category:** Questions\
**Created:** [October 29, 2019, 7:36am UTC](https://devforum.okta.com/t/vue-js-with-okta-auth-404-on-login-redirect-in-heroku/6725 "2019-10-29T07:36:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![LawMaestro](https://avatars.discourse-cdn.com/v4/letter/l/6bbea6/32.png) [@LawMaestro](https://devforum.okta.com/u/LawMaestro)\
**Post date:** [October 29, 2019, 7:36am UTC](https://devforum.okta.com/t/vue-js-with-okta-auth-404-on-login-redirect-in-heroku/6725/1 "2019-10-29T07:36:43Z")

</div>

So I’ve got what appears to be the same problem as described here: [https://stackoverflow.com/questions/51717511/vue-js-express-server-okta-deploy-to-heroku-404-on-implicit-callback](https://stackoverflow.com/questions/51717511/vue-js-express-server-okta-deploy-to-heroku-404-on-implicit-callback)

When running my Vue.js App locally I can sign in and the callback is working fine. However, when deployed to Heroku I get a 404 on the redirect.

My setup looks as follows (with client ID filled in):

```
  Vue.use(Auth, {
    issuer: 'https://dev-130356.okta.com/oauth2/default',
    client_id: 'client_id_here',
    redirect_uri: window.location.origin + '/implicit/callback',
    scope: 'openid profile email'
  })

```

And the configuration in Okta:

 ![25](https://global.discourse-cdn.com/oktadev/original/2X/c/c7df8bbff569bfbfead9de124b0b3fb06960e421.png)

Is there anything obvious I’m missing here?

Thanks!

---

<div class="post-metadata">

**Author:** ![dragos](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/dragos/32/1313_2.png) [@dragos](https://devforum.okta.com/u/dragos)\
**Post date:** [October 29, 2019, 7:49am UTC](https://devforum.okta.com/t/vue-js-with-okta-auth-404-on-login-redirect-in-heroku/6725/2 "2019-10-29T07:49:51Z")

</div>

Hi @LawMaestro

When deploying the Vue application, the server tries to resolve physically `/implicit/callback` path and, because it doesn’t exist, it gives 404. In order to resolve this, please define a routing as mentioned [here](https://cli.vuejs.org/guide/deployment.html#heroku) to point the virtual path to index.html.

---

<div class="post-metadata">

**Author:** ![LawMaestro](https://avatars.discourse-cdn.com/v4/letter/l/6bbea6/32.png) [@LawMaestro](https://devforum.okta.com/u/LawMaestro)\
**Post date:** [November 3, 2019, 3:02pm UTC](https://devforum.okta.com/t/vue-js-with-okta-auth-404-on-login-redirect-in-heroku/6725/3 "2019-11-03T15:02:47Z")

</div>

Hi @dragos

Thanks for the help on this! I also found this: [https://medium.com/binarcode/deploying-vue-apps-to-heroku-the-right-way-26b11c1ae5cd](https://medium.com/binarcode/deploying-vue-apps-to-heroku-the-right-way-26b11c1ae5cd) super useful for a quick summary of essentially what you were saying.

It’s now working as expected 🎉

---

<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:** [January 18, 2024, 12:29am UTC](https://devforum.okta.com/t/vue-js-with-okta-auth-404-on-login-redirect-in-heroku/6725/4 "2024-01-18T00:29:39Z")

</div>

Closed on January 18, 2024, 12:29am UTC

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