How to remove a parameter from a URL?

I have an application that authenticates a user and redirects to streamlit with a code, like:
https://myown.streamlit.app/?code=a1b2c3d4e5
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).

Quick correction to @Goyo 's solution above: I believe it should be st.experimental_set_query_params(), not st.experimental_set_set_query_params().

1 Like

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