stormpath / express-stormpath

Build simple, secure web applications with Stormpath and Express!
http://docs.stormpath.com/nodejs/express/
Apache License 2.0
325 stars 111 forks source link

Updating data in Okta portal is overwritten if user is logged in #629

Open atrp opened 7 years ago

atrp commented 7 years ago

Example: If we update a custom field in Okta and logout out from our application and log back in the data we previously saved in Okta is replaced by the data stored in the users's session even though they logged out.

We do want to update a custom filed when we login (but apparently it updates all custom data which also has the previous data stored in the session).

    postLoginHandler: function(acct, req, res, next) {
        acct.customData.lastLogin = moment().tz('America/Chicago').format('YYYY-MM-DD');
        acct.customData.save();
        next();
    },

This could be related to https://github.com/stormpath/express-stormpath/issues/605