How to remove a parameter from a URL?

I have an application that authenticates a user and redirects to streamlit with a code, like:
Inside streamlit, I use the code to make the login of the user and before that, I want to remove that parameter from the URL.
How can I make this?
I tried something like:
st.experimental_set_set_query_params(code=None) st.experimental_set_set_query_params(code='') st.experimental_set_set_query_params()

But they only make my code parameter empty.

st.experimental_set_set_query_params() works for me (Streamlit v1.21.0).