Password page is losing url parameters

Hey all.
We have a page that is in our webflow that is expecting a parameter:
www.myurl.com/pageA?userId=5

We have put on the standard webflow password protection so that users must enter a password to access the page.

Upon successful login, the user is redirected to www.myurl.com/pageA
The parameter of userId is lost.

Is there an easy way to not lose parameters passed to password protected pages?

Thanks all!

Interesting problem. Yes you can do it but you need to cache the querystring and then recreate it.

You need two scripts;

  • one on your password page that captures a querystring and writes it to sessionStorage
  • one on your target pages ( any pages behind that password protection screen that need the querystring ) which checks sessionStorage, and then re-applies the querystring to the URL.

From there, it’s accessible by scripts for whatever you’re doing.

Note I’d make these little scripts synchronous and put them in the HEAD code area so that they run before any any scripts that might be using that querystring data.