I am planning to use a password policy. If I later change the policy to make it more strict, then current passwords will fail.
Right now, if that happens, I am redirecting the user to the index page. But is there some way to detect that this has occurred so that I can present the user with information about why they were redirected there? Or do I need to build a use specific page to reset the password and redirect to that page?
Basically, I’m asking if there is a way to detect when Bubble rejects a password for not meeting the password policy set in the app.
Thank you for the reply. That’s not exactly what I’m asking. I actually found this article from a different post in this forum:
What I’m asking is this:
If I make my policy more stict AND the redirect is set to either the index page or my password reset page, I want to give the user feedback about why they were redirected there.
We updated our Password Policy to make your account safer. Please create a new password to continue using the app.
Or something like that. But it should not say this, of course, if they simply choose to change their password on their own. So, how can I detect that Bubble has rejected a password because it did not meet the current password policy? This is where I’m stuck.
Thanks.
I just looked at your example. Nice! I like this better than the implementation in the article. I assume you don’t mind if I model my app’s password checker on it (since you posted it)?
You cannot know if an existing user’s password doesn’t meet your new password policy, because you cannot know their actual password (a password isn’t stored as a text - roughly speaking, it’s hashed, and when you enter your password, that’s also hashed so you compare the hashes rather than the password).
Thanks for the reply. Of course I know I can’t get the password, nor do I want to. But if I change my policy and a user does not yet meet that policy, then Bubble will reject it and redirect them to the page I assign (where they can reset their password and pick one that does conform).
My question is how can I check if they arrived at that page because Bubble rejected the new password.
Here is another scenario:
They are not logged in.
I change the policy.
They attempt to login.
They are redirected back to the index page (because they are not logged in and should not have a “reset” password page in case they are not the actual user for that account.)
In this case, the screen just stays on the index page and the user has no idea why. I need some sort of flag so I can provide information that they need to update their password. Does Bubble have anything in this process to indicate that the password did not meet the policy that I can use to know when to provide the user with more information?
The reason I created this post is because this is exactly what happened. It didn’t occur right away because I had the “Stay Logged In” set to Yes.
But once that cycle required the user (me) to re-enter my password, I was on the login page and every time I submitted my username/password, it just kept me on the login page (which is my Index page – also the page that the user was redirected to when they have not changed their password).
So I was looking for a way to detect when this mechanism has been triggered so that I can inform the user about what to do.
I think I’ll just need to create a new page for resetting the password when they are redirected and it can have the instructions there. I do already have a password reset page, but right now the user gets to that when they elect to reset their password, or forgot it. I just wanted to have a way to inform the user.
Of course, I will announce password policy changes if I set those, but we all know that not everyone reads the emails or looks at the in-app notices.
Use the approach in the link I posted. It is a solid approach to showing the user the password policy (I hate it when a password I enter doesn’t meet a sites policy but they don’t tell the policy) as well as showing them when they have completed each portion of the policy individually and avoids errors by detecting spaces in the password.