My app is in rails .
I have a Get browser request coming(when user clicks a link in another website) to my app with important query string parameters like http://example.com?logintoken=hjhzjkdhz .
But I feel that I should use this logintoken in my controller but don't want to show that to user on the browser url bar after rendering the page . so in short I want to show only http://example.com in url bar of browser finally.
Is there a way to just clear the query string ?
I see that redirection to http://example.com at the end is one way to achieve this . Is there any other way ?
You can't do that without redirecting... Well, technically you can, if you manipulate browsers states after render (history push and pop).
On the rails side, you will need to redirect and pass your URL parameter to a server variable and redirect to the action, without the params, using these variables: