# How can I not have code and state parameters in the URL after login?

**URL:** <https://community.auth0.com/t/how-can-i-not-have-code-and-state-parameters-in-the-url-after-login/52468>\
**Category:** Get Help\
**Tags:** vuejs, login, auth0\
**Created:** [October 30, 2020, 1:27pm UTC](https://community.auth0.com/t/how-can-i-not-have-code-and-state-parameters-in-the-url-after-login/52468 "2020-10-30T13:27:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinunger98](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kevinunger98/32/25313_2.png) [@kevinunger98](https://community.auth0.com/u/kevinunger98)\
**Post date:** [October 30, 2020, 1:27pm UTC](https://community.auth0.com/t/how-can-i-not-have-code-and-state-parameters-in-the-url-after-login/52468/1 "2020-10-30T13:27:35Z")

</div>

Hi,  
I implemented the getting started guide for a SPA with VueJs. Everything works fine so far. I can login, logout and make API calls to my own API, which authorizes the user with the checkJwt middleware.

A problem I encountered was that after a successful login, a code and state parameter are present in the URL of the SPA after the redirect from the universal login page.  
How can I remove that or prevent that from happening? Is that default behavior or did I something wrong?

---

<div class="post-metadata">

**Author:** ![kevinunger98](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kevinunger98/32/25313_2.png) [@kevinunger98](https://community.auth0.com/u/kevinunger98)\
**Post date:** [November 11, 2020, 6:07pm UTC](https://community.auth0.com/t/how-can-i-not-have-code-and-state-parameters-in-the-url-after-login/52468/2 "2020-11-11T18:07:42Z")

</div>

Fixed the issue by adding `window.history.pushState({},"", "/")` in the mounted() function of the home page.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [November 26, 2020, 6:08pm UTC](https://community.auth0.com/t/how-can-i-not-have-code-and-state-parameters-in-the-url-after-login/52468/3 "2020-11-26T18:08:02Z")

</div>

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