Giter Club home page Giter Club logo

Comments (9)

robertjd avatar robertjd commented on July 24, 2024

I like this. We should make sure to inform the user that their password was successfully reset before they are taken somewhere else.

from express-stormpath.

lemieux avatar lemieux commented on July 24, 2024

I agree. What do you think about a confirmation page like the verification one that would redirect (with a meta tag) the user automatically to a specified page after a small pause to allow him to understand what is going on (behavior that could be overridden by the developper by changing the template)? This route would only be available if the auto login feature is on.

from express-stormpath.

rdegges avatar rdegges commented on July 24, 2024

I like this -- I'd definitely merge that. Having it pause for like 10 seconds in the meta tag should be fine.

from express-stormpath.

lemieux avatar lemieux commented on July 24, 2024

It's almost done. I just need to test one thing and I'll submit the PR
tomorrow morning.
On Oct 29, 2014 5:51 PM, "Randall Degges" [email protected] wrote:

I like this -- I'd definitely merge that. Having it pause for like 10
seconds in the meta tag should be fine.


Reply to this email directly or view it on GitHub
#30 (comment)
.

from express-stormpath.

lhazlewood avatar lhazlewood commented on July 24, 2024

We haven't talked about this yet @rdegges - any security / password related stuff should be verified before it is released. For example, depending on security requirements, it is rarely a good idea to allow auto-login without first asserting the old password that is to be changed.

from express-stormpath.

lemieux avatar lemieux commented on July 24, 2024

@lhazlewood I fully agree with you and this is why this flow is opt-in. In our app, we decided this was an acceptable flow security-wise. In this case, what would verifying the old password add to the security? Auto-login or not, if someone had access to your reset link, your account is now compromised. The attacker would be able to reset the password and log in anyway. The advantage here is flexibility. In my directory, I can set a password requirement with a minimum of 1 character. I would expect to have the same flexibility here to decide what's my acceptable level of security.

On a different subject, we discussed the fact that after a password reset/change, all sessions (or at least, all other sessions) should be nuked to prevent access to the account on other computers. How would it be possible to do this client-sessions if the sessions are client-side? In my case, I can do it because I swapped the session middleware for express-session, but still... the session nuking should happen in express-stormpath in my opinion.

from express-stormpath.

lhazlewood avatar lhazlewood commented on July 24, 2024

Auto-login or not, if someone had access to your reset link, your account is now compromised.

For 'forgot password' scenario, this is true and auto-login makes sense here. When I posted i was thinking of the 'I know my existing password and just want to change it to a new one' scenario. For this latter scenario, the existing password should be asserted. It wasn't clear to me exactly which scenario was being discussed here :)

from express-stormpath.

lhazlewood avatar lhazlewood commented on July 24, 2024

I don't like static announcement pages that meta refresh to another location - it feels very 'Web 1.0' ish. Instead, in the Java SDK, if a success message or status is supposed to be displayed, I've removed the intermediate status pages and a status=SomeValueHere query parameter is added to the URL before redirect is executed.

This acts as a message source for 'flash' (one time use) messages: the destination page/controller knows that if that query param is present, it can take the query param value and use that as an i18n key and show a status message anywhere it wants in the resulting page.

For example, consider the registration flow:

  • A user successfully fills out a registration form and clicks submit
  • The user is redirected to the login page with a query param status=verifyEmail
  • The login page controller knows to look at that status code and translate it to i18n message
  • The login page template has a div that only shows when the status param is present, for example, "Thanks for registering! Please verify your email address to login."

For a Bootstrap theme, this basically just shows a colored message box (http://getbootstrap.com/css/#helper-classes-backgrounds).

from express-stormpath.

lemieux avatar lemieux commented on July 24, 2024

It wasn't clear to me exactly which scenario was being discussed here :)

:)

it feels very 'Web 1.0' ish.

I agree with you on this. Using flash messages is fairly common practice. The other way around would be to store the messages in the session instead of having a querystring. Personnally, I'm not fond of having state in the querystring, just because the user can mess with it and have your application behave in a way you didn't expect it to (even if it's showing a harmless message on the login page), but that's a personnal preference. I'd like to think that my app is like a state machine, if you do not come from the place that generates that message, it should not be possible to show it.

from express-stormpath.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.